Merge pull request #118 from MoOx/fix/external-scripts-events

Fix external scripts events
This commit was merged in pull request #118.
This commit is contained in:
BehindTheMath
2018-01-31 16:46:28 -05:00
committed by GitHub
2 changed files with 6 additions and 8 deletions

View File

@@ -13,10 +13,11 @@ tape("test evalScript method", function(t) {
evalScript(script)
t.equal(document.body.className, "executed", "script has been properly executed")
// script.innerHTML = "document.write('failure')"
// var bodyText = document.body.text
// evalScript(script)
// t.equal(document.body.text, bodyText, "document.write hasn't been executed")
script.innerHTML = "document.write('failure')"
document.body.text = "document.write hasn't been executed"
var bodyText = document.body.text
evalScript(script)
t.equal(document.body.text, bodyText, "document.write hasn't been executed")
t.end()
})