On a jsdom document:
document = require('jsdom').jsdom("<html><head></head><body></body></html>");
window = document.createWindow();
Changing its hash:
document.location.href = '#bang';
doesn't trigger any 'hashchange'
event on window
Does anyone aware of a workaround for this?
Thank you
Check out the jsdom docs
Try this before the rest of your code:
require('jsdom').defaultDocumentFeatures = {
FetchExternalResources : ['script'],
ProcessExternalResources : ['script'],
MutationEvents : '2.0',
QuerySelector : false
}
var window = jsdom.jsdom(body).createWindow();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With