-
Notifications
You must be signed in to change notification settings - Fork 164
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
Referencing "implements" #659
Comments
Sure, I'm happy to go whichever way here. |
I cannot really use this. Whenever we operate on algorithms they're no longer ECMAScript values. I need the equivalent check for IDL values. I suspect this applies to all specifications that use IDL. Or do we expect specifications to say something like:
? It seems IDL could maybe use something similar to assert that a specification algorithm returns a thing compatible with the IDL fragment? (It might be nice if IDL values were standardized a bit more so "corresponding ECMAScript value" was a defined term too.) |
That's a fair point. Maybe we could use "is a |
I'd caution against "is an X object" because then we get into the confusing situations that we see in whatwg/dom#719. "is a Text object" implies to me it is not a CharacterData object. "implements" is a little better, I guess. (Personally I think this is really an issue with DOM favoring consistency over clarity, but I've given up on that argument.) |
From your description, it sounds like DOM is already using the meaning that we would be hoping for here. Am I missing something? I like the "is an X object" phrasing since it is simple and already widespread. |
The problem is, when you (or at least I) read DOM and see the following list:
(e.g., in https://dom.spec.whatwg.org/#concept-node-clone) it's extremely easy to miss that "is a Comment or Text object" actually means "is a Comment or Text or CDATASection object". We have had multiple cases where we missed this while implementing the corresponding algorithms in jsdom, e.g. jsdom/jsdom@b5f92d5 or jsdom/jsdom@c96decf#diff-a824c999a718befbc63cedf412e05560 |
I'm leaning toward using "implements" in the DOM Standard, but I see there is still the slight problem of it only being defined for ECMAScript values, not IDL objects. I think I'll ignore that issue for now though and assume we'll eventually make it work for either (or allow them to be magically swapped as needed). |
I meant to keep this open as there is still the ECMAScript vs IDL value problem. (The DOM now uses "implements" upon IDL values.) |
Can we try to settle on the one true way that we iterate towards as we make specifications link this concept?
I'm happy to convert DOM, but I'd prefer doing it just the once.
(Apologies for not catching this sooner. But also, thanks a lot for landing that patch, it's great that we finally have formal brand checks.)
The text was updated successfully, but these errors were encountered: