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

<link>.as says default is the empty string, but we don't normally call out default values #3489

Closed
annevk opened this issue Feb 21, 2018 · 4 comments · Fixed by #7926
Closed
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: link topic: resource hints (inc. preload)

Comments

@annevk
Copy link
Member

annevk commented Feb 21, 2018

IDL:

  [CEReactions] attribute DOMString as; // (default "")

Definition of the as content attribute which the as IDL attribute reflects:

The as attribute specifies the potential destination for a preload request for the resource given by the href attribute. It is an enumerated attribute. Each potential destination is a keyword for this attribute, mapping to a state of the same name.

Definition of potential destination:

A potential destination is "fetch" or a destination which is not the empty string.

How does this work?

cc @yoavweiss

@domenic
Copy link
Member

domenic commented Feb 21, 2018

I think the comment is a bit confusing, but, it's still valid.

If a reflecting IDL attribute is a DOMString attribute whose content attribute is an enumerated attribute, and the IDL attribute is limited to only known values, then, on getting, the IDL attribute must return the conforming value associated with the state the attribute is in (in its canonical case), if any, or the empty string if the attribute is in a state that has no associated keyword value or if the attribute is not in a defined state (e.g. the attribute is missing and there is no missing value default). On setting, the content attribute must be set to the specified new value.

@annevk
Copy link
Member Author

annevk commented Feb 21, 2018

Ah indeed. Okay.

@annevk annevk closed this as completed Feb 21, 2018
@domenic
Copy link
Member

domenic commented Feb 21, 2018

We may want to remove the comment anyway, since we don't generally add that in most places, so it feels misleading to call out as specifically.

@annevk annevk reopened this Feb 21, 2018
@annevk annevk added clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project labels Feb 21, 2018
@annevk
Copy link
Member Author

annevk commented Feb 21, 2018

To fix this issue, remove // (default "") from the IDL fragment in the source resource.

@domenic domenic changed the title <link>.as says default is the empty string, but that is not an allowed value <link>.as says default is the empty string, but we don't normally call out default values Feb 21, 2018
JohnTitor added a commit to JohnTitor/html that referenced this issue May 14, 2022
Closes whatwg#3489.

Also, adds my name to acknowledgements.
domenic pushed a commit that referenced this issue May 16, 2022
mfreed7 pushed a commit to mfreed7/html that referenced this issue Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer good first issue Ideal for someone new to a WHATWG standard or software project topic: link topic: resource hints (inc. preload)
Development

Successfully merging a pull request may close this issue.

2 participants