-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Wrong Web IDL type for URLs in HTML Standard #10895
Comments
@rubberyuzu could you take a look at this? |
Since these are getters, and are only ever populated by serializing URLs, it should be a non-observable change to just update the spec to align with best practices. |
Actually, this is observable for However, this made me wonder if we wrote the current spec correctly. It currently says
Which means it's getting the literal value of the But I suspect it would be more useful to get the value reflected by the @rubberyuzu is out on leave for some time, but perhaps @fergald can take a look at this? The action is:
|
Actually, I realized I can check the tests myself. They reveal the Chromium implementation does "parsed-then-serialized src IDL attribute value". Since this makes more sense to me anyway, I'll just send a quick PR to reflect that in the spec. No action needed from @fergald, sorry for the ping. |
url was previously listed as a DOMString, but it should be a USVString. This change is not observable since it always contained a serialized URL anyway. src was previously listed as containing the literal value of the src="" content attribute. However, the intended behavior was to contain the parsed-then-serialized value of the src IDL attribute, i.e., the result after content/IDL attribute reflection. Fix the spec to reflect that, which allows also changing it to USVString. Finally, also account for the fact that sometimes content attributes can be missing, in which case these properties need to return the empty string. (Not null, which is reserved for the top level or non-iframe child cases.) Closes #10895.
While crawling HTML Standard, wrong Web IDL type for URLs:
url
andsrc
in interfaceNotRestoredReasons
usesDOMString
instead of recommendedUSVString
for URLsCc @dontcallmedom @tidoust
This issue was detected and reported semi-automatically by Strudy based on data collected in webref.
The text was updated successfully, but these errors were encountered: