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