Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attributeFilter #367

Closed
domenic opened this issue Jan 25, 2016 · 6 comments
Closed

Add attributeFilter #367

domenic opened this issue Jan 25, 2016 · 6 comments

Comments

@domenic
Copy link
Collaborator

domenic commented Jan 25, 2016

At defineElement time,

  1. Do a Get(PassedConstructor, "attributeFilter").
  2. If it is undefined,
    1. never queue attribute changed callbacks
    2. if attributeChangedCallback is present, throw a "what are you doing?" error
  3. Run the Web IDL "convert to sequence<DOMString>" algorithm on it, rethrowing any errors
  4. Store the resulting sequence as the attribute filter and use it to dispatch attributeChangedCallbacks.

There's no provision in v1 for "all attributes".

@hayatoito
Copy link
Contributor

Bikeshed: Can we avoid to use the term of 'filter' in attributeFilter?
Because "never queue attribute changed callbacks" is now the default behavior, 'filter' sounds weird to me.

observedAttributes or something might be better.

@hayatoito
Copy link
Contributor

I found that the term of attributeFilter is used also in MutationObserver. Then, it might make sense for consistency. :)

@domenic
Copy link
Collaborator Author

domenic commented Jan 29, 2016

I understand the confusion; a filter makes more sense when the default is to allow all. I am OK with observedAttributes. @annevk, @rniwa, any thoughts?

@chaals
Copy link
Contributor

chaals commented Jan 30, 2016

observedAttributes does sound like a clear explanation that "this is where the bikes go"… (is observeAttributes clearer, or just serious bikeshedding?)

@rniwa
Copy link
Collaborator

rniwa commented Jan 30, 2016

observedAttributes does sound like a clear explanation that "this is where the bikes go"… (is observeAttributes clearer, or just serious bike shedding?)

I don't think it should be a verb given it's a property.

@domenic
Copy link
Collaborator Author

domenic commented Mar 8, 2016

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

No branches or pull requests

4 participants