Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: safari/ext/content.js

Issue 5761318371983360: Issue 649 - Dispatch "error" event asynchronusly on Safari (Closed)
Patch Set: Created June 6, 2014, 1:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/content.js
===================================================================
--- a/safari/ext/content.js
+++ b/safari/ext/content.js
@@ -111,9 +111,12 @@
// dispatch it manually. Otherwise element collapsing wouldn't work.
if (type != "sub_frame")
{
- var evt = document.createEvent("Event");
- evt.initEvent("error");
- event.target.dispatchEvent(evt);
+ setTimeout(function()
+ {
+ var evt = document.createEvent("Event");
+ evt.initEvent("error");
+ event.target.dispatchEvent(evt);
+ }, 0);
}
}
}, true);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld