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

Unified Diff: safari/ext/content.js

Issue 5729801683861504: Added workaround for missing safari object in frames with javascript: URL (Closed)
Patch Set: Created Feb. 24, 2014, 3:31 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
@@ -17,6 +17,11 @@
(function()
{
+ // the safari object is missing in frames created from javascript: URLs.
+ // So we have to fallback to the safari object from the parent frame.
+ if (!("safari" in window))
+ window.safari = window.parent.safari;
+
if (window == window.top)
safari.self.tab.dispatchMessage("loading");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld