Skip to content

Clarify CSSURLImageValue.url #639

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2743,7 +2743,9 @@ objects, the {{CSSURLImageValue/url}} attribute contains the URL that references
when called,
perform the following steps:

1. Return a new {{CSSURLImageValue}}
1. If the |url| passed into the constructor is not a [[url#valid-url-string]],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I couldn't figure out how to link the URL spec correctly sorry :/

Copy link
Member

Choose a reason for hiding this comment

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

That doesn't really work. You need to use the URL parser (<a>URL parser</a>) and make sure the return value is not failure. However, you'll also need to pass a base URL for that. And it seems you want to treat fragments as a special value per issue discussion so this probably needs some more thought.

throw a {{TypeError}} and exit this algorithm.
2. Else, return a new {{CSSURLImageValue}}
with its {{CSSURLImageValue/url}} internal slot
set to |url|.
</div>
Expand Down