File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -983,3 +983,15 @@ var clone = oldNode.cloneNode(true);
983983//then replace
984984oldnode.parentNode.replaceChild(clone, oldNode);
985985```
986+
987+ ## event handling
988+
989+ * no ```onclick``` in HTML (seriously :)
990+ * usually via framework but worth knowing the basics
991+ * ```EventTarget.addEventListener(eventType, listener, useCapture)``` adds an event handler
992+ * event type - String representing event type to capture
993+ * listener - object implementing EventListener interface, or simply a function
994+ * useCapture - all events will events dispathed to this listener first before other listeners beneath this in the DOM tree
995+ * ```addEventListener``` is not available in IE8 and before
996+ * useCapture - optional (with default=false) in recent browser
997+ * just always pass useCapture in for brodest compatibility
You can’t perform that action at this time.
0 commit comments