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

Unified Diff: ext/background.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Use messaging for CSS escaping Created July 17, 2017, 11:49 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 | « README.md ('k') | ext/common.js » ('j') | lib/filterComposer.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -617,7 +617,9 @@
{
sender.page = new Page(rawSender.tab);
sender.frame = {
- url: new URL(rawSender.url),
+ // In Edge requests from internal extension pages
+ // (protocol ms-browser-extension://) do no have a sender URL.
+ url: rawSender.url ? new URL(rawSender.url) : null,
get parent()
{
let frames = framesOfTabs.get(rawSender.tab.id);
@@ -695,11 +697,14 @@
{
// Edge does not yet support runtime.openOptionsPage (tested version 38)
// and so this workaround needs to stay for now.
+ // We are not using extension.getURL to get the absolute path here
+ // because of the Edge issue:
+ // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10276332/
ext.showOptions = callback =>
{
chrome.windows.getLastFocused(win =>
{
- let optionsUrl = chrome.extension.getURL("options.html");
+ let optionsUrl = "options.html";
let queryInfo = {url: optionsUrl};
// extension pages can't be accessed in incognito windows. In order to
« no previous file with comments | « README.md ('k') | ext/common.js » ('j') | lib/filterComposer.js » ('J')

Powered by Google App Engine
This is Rietveld