File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ navigation.addEventListener('navigate', event => {
3131
3232export function LavaDome ( host , opts ) {
3333 opts = options ( opts ) ;
34-
34+
3535 // make exported API tamper-proof
3636 defineProperties ( this , { text : { value : text } } ) ;
3737
@@ -41,15 +41,16 @@ export function LavaDome(host, opts) {
4141
4242 // fire every time instance is reloaded and abort loading for non-top documents
4343 const iframe = loadable ( ) ;
44- addEventListener ( iframe , 'load' , ( ) => {
44+ iframe . setAttribute ( 'srcdoc' , '<script>frameElement.xxx()</script>' ) ;
45+ defineProperties ( iframe , { xxx : { value : ( ) => {
4546 const ownerDoc = ownerDocument ( iframe ) ;
4647 if ( ownerDoc !== document ) {
4748 replaceChildren ( shadow ) ;
4849 throw new Error ( `LavaDomeCore: ` +
4950 `The document to which LavaDome was originally introduced ` +
5051 `must be the same as the one this instance is inserted to` ) ;
51- }
52- } ) ;
52+ } } } }
53+ ) ;
5354
5455 // child of the shadow, where the secret is set, must be hardened
5556 const child = hardened ( ) ;
You can’t perform that action at this time.
0 commit comments