-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The following statement is ambiguous and could be read as incorrect:
Many native features add methods etc to the element. E.g. the popover attribute also adds showPopover().
showPopover is always a property of the HTMLElement, it just doesn't do anything unless the popover attribute is also present.
It's minor but I think important to note that the presence of the attribute is not monkey-patching the prototype.
Not to say custom attributes couldn't add methods to a prototype - just that those methods would likely be added to the element prototype when the attribute is initially defined, not just when the attribute is appended to an element instance (assuming custom attributes wants to follow existing behaviour).
Metadata
Metadata
Assignees
Labels
No labels