You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you accept a minimum implementation of [ShadowRoot] and [attachShadow] for the purposes of taking part in toString of HTMLElement? It helps using dom-lite in unit tests of web components. I have an implementation in 30 LOC.
It could be either added to index.js to be always available, or left outside to be required separately. The separate require would modify the prototype of HTMLElement.
const{ document }=require('dom-lite')require('dom-lite/shadow-dom')// inject the implementation
Adding it to index.js would make the usage easier, providing the tiny size of the implementation.
Would you accept a minimum implementation of [ShadowRoot] and [attachShadow] for the purposes of taking part in
toString
ofHTMLElement
? It helps usingdom-lite
in unit tests of web components. I have an implementation in 30 LOC.It could be either added to
index.js
to be always available, or left outside to berequire
d separately. The separate require would modify the prototype ofHTMLElement
.Adding it to
index.js
would make the usage easier, providing the tiny size of the implementation.What do you think?
[ShadowRoot https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot
[attachShadow]: https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow
The text was updated successfully, but these errors were encountered: