javascript - Why there are the two frames, when inspect on webview element of a chrome packaged app -
picture first: two frames in chrome developer tools.
i have chrome packaged app, have webview element. src of webview set about:blank shown. why there 2 frames chrome developer tools when inspect on webview element.
this confusing, because when add script using addcontentscripts, window object in injected script seems same second frame (chrome-extension://...), window object in webview page's own script top frame.
finally, found answer myself. link first:content script
in brief, due security considerations, chrome keeps each content script, page itself, in different script environments called isolated world. scripts share same dom, js environments different.
Comments
Post a Comment