(value, m, l, o)
| 19 | }; |
| 20 | |
| 21 | const set = (value, m, l, o) => { |
| 22 | const handler = create(o, {element: {enumerable: true, value}}); |
| 23 | for (let i = 0, {length} = l; i < length; i++) |
| 24 | value.addEventListener(l[i].t, handler, l[i].o); |
| 25 | m.set(value, handler); |
| 26 | if (handler.init) |
| 27 | handler.init(); |
| 28 | const {observedAttributes} = o; |
| 29 | if (observedAttributes) { |
| 30 | const mo = new MutationObserver(attributeChangedCallback); |
| 31 | mo.observe(value, { |
| 32 | attributes: true, |
| 33 | attributeOldValue: true, |
| 34 | attributeFilter: observedAttributes.map(attributeName => { |
| 35 | if (value.hasAttribute(attributeName)) |
| 36 | handler.attributeChanged( |
| 37 | attributeName, |
| 38 | null, |
| 39 | value.getAttribute(attributeName) |
| 40 | ); |
| 41 | return attributeName; |
| 42 | }) |
| 43 | }); |
| 44 | attributes.set(mo, handler); |
| 45 | } |
| 46 | return handler; |
| 47 | }; |
| 48 | |
| 49 | const {drop, flush, parse} = QSAO({ |
| 50 | query, |
no test coverage detected