Issue metadata
Sign in to add a comment
|
sender.frameId is empty for messages sent from background child frame
Reported by
siria...@gmail.com,
Aug 28 2017
|
||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Steps to reproduce the problem:
Append iframe in background page and send message from content script of this frame.
Easier way to reproduce:
1. manifest.json:
{
"name": "Test",
"manifest_version": 2,
"version": "0.1",
"content_scripts": [
{
"js": [
"content.js"
],
"matches": ["<all_urls>"],
"run_at": "document_start",
"all_frames": true
}
],
"background": {
"scripts": ["background.js"]
}
}
2. content.js
chrome.runtime.sendMessage('');
3. background.js
chrome.runtime.onMessage.addListener((m,sender) => console.log(sender));
function test() {
let frame = document.createElement('frame');
frame.src = 'https://example.org';
document.body.appendChild(frame);
}
if (document.body) {
test()
} else {
document.addEventListener("DOMContentLoaded", test);
}
What is the expected behavior?
At least sender.frameId must not be empty. Because child frame 100% HAS unique frameId (you could check it using for example chrome.webRequest API)
What went wrong?
sender object contains only "id" and "url" properties. But must also contain at least "frameId" property
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 60.0.3112.113 Channel: stable
OS Version: OS X 10.12.5
Flash Version:
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by manoranj...@chromium.org
, Aug 28 2017Status: Duplicate (was: Unconfirmed)