Closed Bug 1310331 Opened 7 years ago Closed 7 years ago

Support match_about_blank in tabs.executeScript


(WebExtensions :: Untriaged, defect, P3)

48 Branch


(firefox53 verified)

Tracking Status
firefox53 --- verified


(Reporter: zombie, Assigned: zombie)


(Depends on 1 open bug, Blocks 1 open bug)


(Whiteboard: triaged)


(1 file)

+++ This bug was initially created as a clone of Bug #1272890 +++

Filed as followup after I scoped the original down to only content scripts.
For this to work on about:blank documents loaded in top-level windows (tabs), I believe we need to check permissions against the tab's opener, so marking this blocked on bug 1238314.

We don't need openerTabId, but the decision/platform support on how to reliably determine the opener from that bug.
Depends on: 1238314
This shouldn't depend on tab opener support. `tabs.create` doesn't support inherited origins, and that won't change with opener support. Origins inherited in windows created with `` might come into play, but only the actual principal of the document should matter in that case.
No longer depends on: 1238314
Assignee: nobody → tomica
Blocks: 1315553
No longer blocks: 1315553
Depends on: 1315553
Attachment #8807101 - Flags: review?(kmaglione+bmo)
Comment on attachment 8807101 [details]
bug 1310331 - implement matchAboutBlank for tabs.executeScript

Nice! Thanks
Attachment #8807101 - Flags: review?(kmaglione+bmo) → review+
Keywords: checkin-needed
Blocks: 1317166
Pushed by
implement matchAboutBlank for tabs.executeScript r=kmag
Keywords: checkin-needed
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Based on and this issue is verified as fixed on Firefox 53.0a1 (20161121030224) under Windows 7 64-bit and Ubuntu 16.04 LTS 32-bit, after the script is executed '44' is displayed in the browser console and in the web page.

Here is a video:
I have tried it with Firefox 53.0a2 (2017-01-30) (64-bit) on Windows 10 64-bit and it works for executeScript (file or code) but not tabs.sendMessage, which is the method I use to pass some parameters to the injected script.

I have the "Could not establish connection. Receiving end does not exist." error if I execute the sendMessage on the id of the new "about:blank" tab, and "An unexpected error occurred" error if I execute it in the callback of the executeScript.

Is there any limitation on sendMessage for about:blank page? I haven't found any information about that or a matchAboutBlank parameter.

Is this a wanted limitation or another bug?

I'm not sure I follow, but if you can provide a simplified extension that exhibits the problem, please feel free to file a new bug.
My bad, the issue is the submission on a custom form on the blank tab (the form is created through a content script injected in the blank tab).
This bug is fixed, I will submit a new for the submission issue.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.