Helpers - RomainValy/ToDoMVC-OpenclassRoom-project GitHub Wiki
Tools what we need!
Table of Contents
qs
Get element(s) by CSS selector:
Parameters
selectorscope
$on
addEventListener wrapper:
Parameters
targettypecallbackuseCapture
$delegate
Attach a handler to event for all elements that match the selector, now or in the future, based on a root element
Parameters
targetselectortypehandler
$parent
Find the element's parent with the given tag name:
Parameters
elementtagName
Examples
$parent(qs('a'), 'div');
useCapture
https://developer.mozilla.org/en-US/docs/Web/Events/blur
forEach
Allow for looping on nodes by chaining:
Examples
qsa('.foo').forEach(function () {})