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 an implementation of Event and EventTarget? It helps using dom-lite in unit tests that add and remove event listeners by calling the DOM API. I have an implementation in 120 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 prototypes of document and HTMLElement.
const{ document }=require('dom-lite')require('dom-lite/events')// inject the implementation
Adding it to index.js would make the usage easier, providing the small size of the implementation.
What do you think?
The text was updated successfully, but these errors were encountered:
Would you accept an implementation of Event and EventTarget? It helps using
dom-lite
in unit tests that add and remove event listeners by calling the DOM API. I have an implementation in 120 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 prototypes ofdocument
andHTMLElement
.Adding it to
index.js
would make the usage easier, providing the small size of the implementation.What do you think?
The text was updated successfully, but these errors were encountered: