Created
November 19, 2019 21:53
-
-
Save betweenbrain/7587859f07d3cc20ed01f44f16b50ab3 to your computer and use it in GitHub Desktop.
Revisions
-
betweenbrain renamed this gist
Nov 19, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
betweenbrain created this gist
Nov 19, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ ## Using `querySelectorAll` ```` const inits = this.$el.querySelectorAll('[ga-init]'); inits.forEach(elem => { elem.removeAttribute('ga-init'); elem.removeAttribute('data-ga'); }); ```` ## Using `$children` ```` const children = this.$children; children.forEach(elem => { elem.$el.removeAttribute('ga-init'); elem.$el.removeAttribute('data-ga'); }); ````