Skip to content

HtmlEventProperty class

One value inside an HtmlEventProperties event bag --- returned by HtmlEventProperties.Item. Carries the field's Value plus a Properties accessor for nested drill-down (e.g. eventInfo.target.id).

Almost always written in shorthand --- neither HtmlEventProperty nor its parent HtmlEventProperties is typically named in addin code; the compiler resolves chains like eventInfo.target.id through their default-members. Unlike HtmlElementProperty, Value is read-only --- event payloads are an inbound signal from the DOM, not an outbound property setter.

vb
Private Sub MyButtonKeyUp(ByVal eventInfo As HtmlEventProperties)
    If eventInfo.key = "Enter" Then
        Dim entered As String = eventInfo.target.value
        ' …
    End If
End Sub

Properties

Properties

A nested HtmlEventProperties for fields that themselves have sub-fields (the canonical example is .target, whose sub-fields are the target element's own properties --- id, value, name, tagName, …). Read-only at the accessor level.

Syntax: property.Properties As HtmlEventProperties

Value

The field's value, as a Variant. DefaultMember --- so eventInfo.key desugars to eventInfo.Item("key").Value. Read-only --- event payloads cannot be modified.

Syntax: property As Variant

The interface is [COMExtensible(True)] --- see Dynamic DOM property resolution on the package overview. Field names that route through Properties are resolved against the live event object at run time, not declared statically.

twinBASIC and LOGO copyright of "WaynePhillipsEA" author