Closed Bug 1310331 Opened 3 years ago Closed 3 years ago
_about _blank in tabs .execute Script
58 bytes, text/x-review-board-request
+++ 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 `window.open` 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
Status: NEW → ASSIGNED
Attachment #8807101 - Flags: review?(kmaglione+bmo)
Comment on attachment 8807101 [details] bug 1310331 - implement matchAboutBlank for tabs.executeScript https://reviewboard.mozilla.org/r/90378/#review92554 Nice! Thanks
Attachment #8807101 - Flags: review?(kmaglione+bmo) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/4971c7511bbc implement matchAboutBlank for tabs.executeScript r=kmag
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1272890#c0 and https://bugzilla.mozilla.org/show_bug.cgi?id=1272890#c36 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: http://screencast.com/t/1FJCDlCx
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? Thanks.
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.
You need to log in before you can comment on or make changes to this bug.