Closed laurieboyes closed 5 years ago
Did you consider a typeof window
check first, just to avoid the try/catch which engines tend to not like? Would that be better?
Otherwise LGTM, can't see a problem with this!
Ændrew had a similar issue with o-grid
; I suspect this will sort it it!
Hi Laurie, hi!! 👋
I'd like to test my ftdomdelegate-using client-side code on the server using JSDom or something similar.
When defining the matches function, we look for
Element
on the window. On server-side code, this results in a ReferenceError.This change allows me to still test my client-side code using JSDom, as long as, as part of my test setup, I make my JSDom document's
Element
property a property of the nodeglobal
object.Would this be an acceptable addition?