Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Tracking things injected into the pages, so they can be ignored #26

Open
matatk opened this issue Oct 11, 2014 · 0 comments
Open

Tracking things injected into the pages, so they can be ignored #26

matatk opened this issue Oct 11, 2014 · 0 comments
Labels

Comments

@matatk
Copy link
Contributor

matatk commented Oct 11, 2014

When WAT scripts inject stuff into the page, such as indicators of heading structure, these are treated as if they're part of the page from the perspective of other WAT scripts. It should be possible, e.g. using the data- attributes, to keep track of WAT-injected elements and ignore them from scripts. I would suggest this could be achieved by the addition of two library functions:

  • One function would wrap the creation of elements to be injected and would ensure they are marked in some unique way (e.g. setting a data- attribute).
  • Another function would be used to filter those elements out -- it could for example wrap getElementBy* and the CSS selector functions.

If WAT scripts were updated to use these wrappers when creating and searching for elements, I think that could solve it.

I'm happy to take this, but it will affect lots of files, so whoever takes it, it'll need some concerted effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant