Skip to content

Instantly share code, notes, and snippets.

View x-frame-bypass.js
customElements.define('x-frame-bypass', class extends HTMLIFrameElement {
constructor () {
super()
}
connectedCallback () {
this.load(this.src)
this.src = ''
this.sandbox = '' + this.sandbox || 'allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation' // all except allow-top-navigation
}
load (url, options) {