Intrinsic Events - sgml/signature GitHub Wiki
Command decouples the object that invokes the operation from the one that knows how to perform it. It takes a function as a parameter and uses method dispatch based on the following naming convention:
- All clients of Command objects treat each object as a "black box"
- The Command object's virtual execute() method is called whenever the client requires the object's "service".
- execute takes a parameter that maps to a concrete implementation
- Sequences of Command objects can be assembled into composite (or macro) commands.
The following example queues 24 processes and waits on each to finish before launching another.
find /path -name '*.foo' | xargs -P 24 -I '{}' /cpu/bound/process '{}' -o '{}'.out
DOM0 Events are declarative events defined in the HTML and XHTML specifications as Intrinsic Events:
Intrinsic events are attributes that are used in conjunction with elements that can have specific events occur when certain actions are performed by the user. The attributes indicated in the following table are added to the attribute set for their respective elements only when the modules defining those elements are selected.
Certain elements of a markup language may have associated event handlers that are activated when certain events occur. User agents need to be able to identify those elements with event handlers statically associated (i.e., associated in the content, not in a script). In HTML 4 ([HTML4], section 18.2.3), intrinsic events are specified by the attributes beginning with the prefix "on":
onblur, onchange, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onload, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onreset, onselect, onsubmit, and onunload
.
Internet Explorer has the correct scope for event handlers defined using the DOM Level 0 method of property assignment but not when using
attachEvent()
.
The Level 0 DOM supports the following nodeLists: document.images[], which grants access to all images on the page. document.forms[], which grants access to all forms on the page. document.forms[].elements[], which grants access to all form fields in one form, whatever their tag name. This nodeList is unique to the Level 0 DOM; the W3C DOM does not have a similar construct. document.links[], which grants access to all links () on the page. document.anchors[], which grants access to all anchors () on the page.
The focus events defined in this specification occur in a set order relative to one another. The following is the typical sequence of events when a focus is shifted between elements (this order assumes that no element is initially focused):
Event Name Notes 1. focusin Sent before first target element receives focus 2. focus Sent after first target element receives focus 3. focusout Sent before first target element loses focus 4. focusin Sent before second target element receives focus 5. blur Sent after first target element loses focus 6. focus Sent after second target element receives focus
The following is the typical sequence of events when a focus is shifted between elements, including the deprecated DOMFocusIn and DOMFocusOut events. The order shown assumes that no element is initially focused.
C.2.1 Legacy FocusEvent event order Event Name Notes 1. focusin Sent before first target element receives focus 2. focus Sent after first target element receives focus 3. DOMFocusIn If supported 4. focusout Sent before first target element loses focus 5. focusin Sent before second target element receives focus 6. blur Sent after first target element loses focus 7. DOMFocusOut If supported 8. focus Sent after second target element receives focus 9. DOMFocusIn If supported
HTML Events are imperative events defined in the DOM specification as HTMLEvents:
<iframe src="https://www.w3.org/DOM/Graphics/dom2-map.svg" width="900" height="400"></iframe>
<img src="https://www.w3.org/TR/DOM-Level-3-Events/images/eventflow.svg" width="400" height="400"/>
References
-
GitHub - Benvie/idl-for-javascript: IDL converted to a format and semantics usable by JavaScript
-
GitHub - jsantell/chrome-api-definitions: Definition generator for Chrome Platform APIs
-
https://stackoverflow.com/questions/24635536/different-behavior-of-blur-event-in-different-browsers
-
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15480916/
-
https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
-
Breaking out of the Matrix with React Portals and Mutation Observer