-
Notifications
You must be signed in to change notification settings - Fork 31
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
Overloading methods in a separate partial definition is invalid #209
Comments
Can we annotate them in some way that they're not indexed? It shouldn't really matter until it's standardized. |
Would this work? #210 That looks a bit dorky, since it just renames the methods in questions by adding a |
Yes, adding The renames obviously work as well. We can also make do with the problem from a tooling perspective. We would create a patch on our side to exclude the IDL and make the tools happy again. That's less ideal for us, of course ;) Anyway, I was more reporting the problem so what you are aware of it and not surprised that propagation to WPT appears broken. |
This closes #209, by adding "__TO_BE_MERGED" to any methods already defined in HTML. The intent is that the reader can still identify which method we mean, but the tools won't get confused.
The Sanitizer API overloads methods already defined in HTML, such as
Document.parseHTMLUnsafe()
(HTML, Sanitizer API).That is forbidden by Web IDL: it imposes that "Operations must not be overloaded across interface, partial interface, interface mixin, and partial interface mixin definitions." (see Overloading).
I suspect that you're doing that on purpose, know what you're doing, and that the final goal is to upstream these definitions to HTML. I also don't see any immediate workaround (apart from relaxing the constraint in Web IDL, perhaps?)
In the meantime, I note that this creates a practical problem: the updated IDL defined in the Sanitizer API cannot reach Web Platform Tests (
interfaces/sanitizer-api.idl
) because one of the guarantees that we enforce in Webref on the way to Web Platform Tests is that the Web IDL as a whole, merging the IDL defined across specs, is valid.The text was updated successfully, but these errors were encountered: