Bug 1240913 - Add @allowfullscreen to appease swapFrameLoaders. r=ochameau
We don't really need fullscreen access here, but we do need the same access to
browser features as regular browser tabs. The `swapFrameLoaders` platform API
we use compares such features before allowing the swap to proceed.
MozReview-Commit-ID: DVPUC1QKBgJ
--- a/devtools/client/responsive.html/components/browser.js
+++ b/devtools/client/responsive.html/components/browser.js
@@ -98,19 +98,25 @@ module.exports = createClass({
/**
* React uses a whitelist for attributes, so we need some way to set
* attributes it does not know about, such as @mozbrowser. If this were
* the only issue, we could use componentDidMount or ref: node => {} to
* set the atttibutes. In the case of @remote, the attribute must be set
* before the element is added to the DOM to have any effect, which we
* are able to do with this approach.
+ *
+ * @noisolation and @allowfullscreen are needed so that these frames
+ * have the same access to browser features as regular browser tabs.
+ * The `swapFrameLoaders` platform API we use compares such features
+ * before allowing the swap to proceed.
*/
dangerouslySetInnerHTML: {
__html: `<iframe class="browser" mozbrowser="true" remote="true"
- noisolation="true" src="${location}"
- width="100%" height="100%"></iframe>`
+ noisolation="true" allowfullscreen="true"
+ src="${location}" width="100%" height="100%">
+ </iframe>`
}
}
);
},
});