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

Fix url and src in NotRestoredReasons #10916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

domenic
Copy link
Member

@domenic domenic commented Jan 15, 2025

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.

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/nav-history-apis.html ( diff )

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.
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@domenic
Copy link
Member Author

domenic commented Jan 15, 2025

I'll give this a week in case @smaug---- wants to take a look, and plan on merging after that.

data-x="nav-container">container</span>'s <code data-x="attr-iframe-name">name</code> attribute.</p></li>
<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-name">name</span> to
<var>container</var>'s <code data-x="attr-iframe-name">name</code> attribute's value, or the
empty string if it has no such attribute.</p></li>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why empty string? https://html.spec.whatwg.org/#nrr-struct defaults to null anyhow.

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

Successfully merging this pull request may close these issues.

Wrong Web IDL type for URLs in HTML Standard
3 participants