Load frame content using contentDocument.location.href instead of src attribute (#529)

This commit is contained in:
toasted-nutbread 2020-05-10 14:08:18 -04:00 committed by GitHub
parent 9742d5662b
commit c38cd70e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,9 +336,9 @@ class Popup {
const {secret, token} = await this._initializeFrame(this._frame, this._targetOrigin, this._frameId, (frame) => { const {secret, token} = await this._initializeFrame(this._frame, this._targetOrigin, this._frameId, (frame) => {
frame.removeAttribute('src'); frame.removeAttribute('src');
frame.removeAttribute('srcdoc'); frame.removeAttribute('srcdoc');
frame.setAttribute('src', chrome.runtime.getURL('/fg/float.html'));
this._observeFullscreen(true); this._observeFullscreen(true);
this._onFullscreenChanged(); this._onFullscreenChanged();
frame.contentDocument.location.href = chrome.runtime.getURL('/fg/float.html');
}); });
this._frameSecret = secret; this._frameSecret = secret;
this._frameToken = token; this._frameToken = token;