File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ function applyRestrictions(allowedSelectors) {
3838 selectorElement . style . border = '2px solid green' ;
3939 }
4040
41+ // mark all instrumented children as verified
42+ const children = selectorElement . querySelectorAll ( '[data-aue-type]' ) ;
43+ children . forEach ( child => {
44+ child . dataset . aueVerified = 'true' ;
45+ } ) ;
46+
4147 // if its a container block item or default content
4248 // if it doesnt have a class 'block' try the closest parent that has a class block
4349 if ( ! selectorElement . classList . contains ( 'block' ) ) {
@@ -72,7 +78,7 @@ function applyRestrictions(allowedSelectors) {
7278
7379 // remove instrumention from the rest of the elements
7480 // select all elements that dont have data-aue-verified="true" and that dont have an ancestor that has data-aue-verified="true"
75- const unverifiedElements = document . querySelector ( 'main' ) ?. querySelectorAll ( '*:not( [data-aue-verified="true"]) * :not([data-aue-verified="true"])' ) ;
81+ const unverifiedElements = document . querySelector ( 'main' ) ?. querySelectorAll ( '*[data-aue-type] :not([data-aue-verified="true"])' ) ;
7682
7783
7884 console . log ( 'Unverified Elements:' , unverifiedElements ) ;
You can’t perform that action at this time.
0 commit comments