page.Refresh
' get the ID from the B4JSUniqueKey
Dim HoverID As String = GetIDFromUniqueKey("MyUnique1")
Dim MyJS As ABMHover
MyJS.Initialize(ws, "myJS")
MyJS.AddHover(ws, HoverID)
'page.ShowCookiesMessage(FieldNames.Get("gdpr"), "2f3033", "FFFFF", "ff9800", "000000", "444444", FieldNames.Get("gdprAccept"), FieldNames.Get("gdprMoreInfo"), "#", 365)
page.ShowCookiesMessage(FieldNames.Get("gdpr"), "2f3033", "FFFFF", "ff9800", "000000", "444444", FieldNames.Get("gdprAccept"), "", "#", 365)
End Sub
' the event
Sub MyJS_Hover(ID As String, IsOver As Boolean)
Log(ID & " Is Over: " & IsOver)
End Sub
' retrieve the ID from the B4JSUniqueKey you've previously set on creation
public Sub GetIDFromUniqueKey(uniqueKey As String) As String
Dim script As String = $"return $("[data-b4js='${uniqueKey.ToLowerCase}']").attr('id');"$
Dim ret As Future = page.ws.EvalWithResult(script, Null)
Return ret.Value
End Sub