Skip to content

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

Closed

Description

@annevk

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

Activity

  1. added
    topic: links
    on Feb 21, 2018
  2. domenic commented on Feb 21, 2018

    @domenic
    Member

    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.

  3. annevk commented on Feb 21, 2018

    @annevk
    MemberAuthor

    Ah indeed. Okay.

  4. domenic commented on Feb 21, 2018

    @domenic
    Member

    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.

  5. reopened this on Feb 21, 2018
  6. added
    clarification
    good first issue
    on Feb 21, 2018
  7. annevk commented on Feb 21, 2018

    @annevk
    MemberAuthor

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

  8. 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[/+] on Feb 21, 2018
  9. added
    topic: resource hints (inc. preload)
    on May 4, 2022
  10. added a commit that references this issue on May 14, 2022
    0bad211
  11. added a commit that references this issue on May 16, 2022
    d0e6f68
  12. added a commit that references this issue on Jun 3, 2022
    33ddbdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationgood first issuetopic: linkstopic: resource hints (inc. preload)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions