-
Notifications
You must be signed in to change notification settings - Fork 19
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
Simplifying the WebIDL #338
Comments
@HadrienGardeur I do not have a strong opinion on this. I understand the arguments. For me the central point is your third one:
yes indeed, they are helpers, and they would have their place as a method in a, say, JS object that embodies the Manifest. We agree on that. However, I tend to view our WebIDL (because we do not define some sort of a Web API) as mostly an abstract, language independent definition of such an object and, hence, I think it is better to keep it there. But, as I say, I do not have a strong opinion, ie, I am fine with whatever direction the WG takes. @TzviyaSiegman @wareid @GarthConboy (Note, for completeness, that if the PR #339 is merged, then |
@iherman this is my first time working with WebIDL, so I'm clearly no expert at this but from a quick glance at the spec, if we really want to declare such helpers, they should be defined as getters, not the way they're currently defined where we're basically duplicating info. Do we have anyone with good knowledge of the way WebIDL works in our group? |
@iherman <https://github.com/iherman> this is my first time working with WebIDL, so I'm clearly no expert at this but from a quick glance at the spec, if we really want to declare such helpers, they should be defined as getters, not the way they're currently defined where we're basically duplicating info.
That is a good idea. (And this is how I actually implement them in my JS application, where the IDL spec becomes a class.)
Do we have anyone with good knowledge of the way WebIDL works in our group?
No idea. I actually do not think so...
|
B.t.w., the URL of the HTMLElement can be retrieved, I believe, via:
|
With the caveat that we should ask an expert... having looked at the WebIDL a bit, what WebIDL calls a getter/setter is different than what we refer to (see https://www.w3.org/TR/WebIDL-1/#idl-special-operations). They seem to be the operations one can define when defining one's own 'dictionary' like structure (but I may misunderstand). If we want to separate the 'helpers' from the rest, an approach may be:
But yes, we should ask for help:-) |
Let me modify my previous proposal a bit. It may be cleaner to do something like:
This may provide a better separation of the manifest and the helper functions, defined as separate set of operations, and we keep the relative simplicity of dictionaries for the rest. |
As suggested by @JayPanoz, I think that the two participants that are the most likely capable of helping us on this would be @danielweck or someone from Microsoft (ping @BCWalters). |
Last time I "played" with WebIDL was when I helped write the definition of |
We could consider soliciting help at TPAC from people really familiar with WebIDL. |
FYI, I have asked one of my team colleagues to give his reaction on the approach described in #338 (comment). If I get a positive reply, is it o.k. if I come up with a PR with the changes? |
The latest discussions on #291 shows that (1) the extraction of a TOC from the HTML structure may be relatively complex and (2) it may not really needed by the User Agent which may decide to use the TOC HTML directly. What this means is that the helper functions described in #338 (comment) may be unnecessary. I think we should
I will add the changes to the PR related to the resolutions of #291. |
I'm OK with removing them from the WebIDL for now, it felt like duplication anyway. |
1. Have put a reference to the new appendix from section 4.7.3. 2. Have removed the explicit WebIDL entry for TOC (and its acolytes), in line with the proposal in #338 Cc @mattgarrish
- adds a reference to the new appendix from section 4.7.3. - removes the explicit WebIDL entry for TOC (and its acolytes), in line with the proposal in #338
…or a machine-readable table of contents - adds a reference to the new appendix from section 4.7.3. - removes the explicit WebIDL entry for TOC (and its acolytes), in line with the proposal in #338
Done in #371; closing |
The current WebIDL has dedicated elements for a few infoset items:
I think that having these in our WebIDL is a little bit misleading:
readingOrder
,resources
orlinks
The text was updated successfully, but these errors were encountered: