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

Side by Side Diff: chrome/ext/popup.js

Issue 29366773: Issue 4698 - Popup window is broken in Edge (Closed)
Patch Set: Created Dec. 5, 2016, 12:15 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | stats.js » ('j') | stats.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 (function() 1 (function()
2 { 2 {
3 if ((typeof chrome == "undefined") || (typeof chrome.extension == "undefined") )
4 chrome = browser;
3 var backgroundPage = chrome.extension.getBackgroundPage(); 5 var backgroundPage = chrome.extension.getBackgroundPage();
4 window.ext = Object.create(backgroundPage.ext); 6 window.ext = Object.create(backgroundPage.ext);
5 7
6 ext.closePopup = function() 8 ext.closePopup = function()
7 { 9 {
8 window.close(); 10 window.close();
9 }; 11 };
10 12
11 // We have to override ext.backgroundPage, because in order 13 // We have to override ext.backgroundPage, because in order
12 // to send messages the local "chrome" namespace must be used. 14 // to send messages the local "chrome" namespace must be used.
13 ext.backgroundPage = { 15 ext.backgroundPage = {
14 sendMessage: chrome.runtime.sendMessage, 16 sendMessage: chrome.runtime.sendMessage,
15 17
16 getWindow: function() 18 getWindow: function()
17 { 19 {
18 return backgroundPage; 20 return backgroundPage;
19 } 21 }
20 }; 22 };
21 })(); 23 })();
OLDNEW
« no previous file with comments | « no previous file | stats.js » ('j') | stats.js » ('J')

Powered by Google App Engine
This is Rietveld