File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/canvas-extensions/dataset-exposers Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ export default class NodeExposerExtension extends CanvasExtension {
2424 if ( ! nodeData ) return
2525
2626 this . setDataAttributes ( node . nodeEl , nodeData )
27+
28+ const iframe = node . nodeEl . querySelector ( 'iframe' ) ?. contentDocument ?. body
29+ if ( iframe ) this . setDataAttributes ( iframe , nodeData )
2730 }
2831 ) )
2932
@@ -36,14 +39,11 @@ export default class NodeExposerExtension extends CanvasExtension {
3639 const nodeData = node . getData ( )
3740 if ( ! nodeData ) return
3841
39- const iframe = node . nodeEl . querySelector ( 'iframe' )
42+ const iframe = node . nodeEl . querySelector ( 'iframe' ) ?. contentDocument ?. body
4043 if ( ! iframe ) return
4144
42- const iframeBody = iframe . contentDocument ?. body
43- if ( ! iframeBody ) return
44-
45- iframeBody . classList . add ( 'canvas-node-iframe-body' )
46- this . setDataAttributes ( iframeBody , nodeData )
45+ iframe . classList . add ( 'canvas-node-iframe-body' )
46+ this . setDataAttributes ( iframe , nodeData )
4747 }
4848 ) )
4949 }
You can’t perform that action at this time.
0 commit comments