Closed
Description
Vue.js version
1.0.23
Reproduction Link
None, since it is related to chrome extension
Steps to reproduce
I am using cVim chrome-extension, it will insert <iframe src="chrome-extension://ihlenndgcmojhcghmfjfneahoeklbjjh/cmdline_frame.html" id="cVim-command-frame"></iframe>
into body
I am using vue-router, and it is throwing error to block the app to run:
vue.common.js:1140
Uncaught SecurityError: Blocked a frame with origin "https://xxxxx" from accessing a frame with origin "chrome-extension://ihlenndgcmojhcghmfjfneahoeklbjjh". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "chrome-extension". Protocols must match.
It is failing at:
function inDoc(node, win) {
win = win || window;
var doc = win.document.documentElement; // !!! here --> Protocols must match
var parent = node && node.parentNode;
var isInDoc = doc === node || doc === parent || !!(parent && parent.nodeType === 1 && doc.contains(parent));
if (!isInDoc) {
var frames = win.frames;
if (frames) {
for (var i = 0; i < frames.length; i++) {
if (inDoc(node, frames[i])) {
return true;
}
}
}
}
return isInDoc;
}
What is Expected?
Even with a chrome-extension, app should run.
What is actually happening?
Due to the error, vue app is not running, giving a blank screen to users.