Closed raysuelzer closed 6 years ago
Would you please provide a small example?
I'm closing this because I think it has to do with angular's nativeElement.
I am going to reopen this issue because I was able to narrow it down a bit more and provide an example.
When using document.getElementByid
the line
if( !NodeList.prototype.isPrototypeOf( this.el ))return;
will exit. It would be nice be able to pass in a DOM element. I can work on this if you would like?
Example: https://plnkr.co/edit/p5WwkE8bMKuXsPBghohs?p=preview
A change like this allows it accept a single element
this.el = this.isString( el ) ? document.querySelectorAll( el ) : [el]; // wrap el in an array so it can be looped
// if( !NodeList.prototype.isPrototypeOf( this.el ))return; Remove this check, or do another check that doesn't return if the element is is not a NodeList
The code seems to choke on text nodes.
To reproduce, attempt to pass native element which includes text nodes (any white space).