Skip to content

Align anchor IDL across the platform? #12063

@bkardell

Description

@bkardell

What is the issue with the HTML Standard?

Given recent work on the Sanitizer API, SVG and MathML it seems like it would make sense to share as much as possible, as easily as possible about what it means to be a link..

Is it worth breaking out a generic anchor element and then keeping the downstream specs very simple? Maybe something like

[Exposed=Window]
interface AnchorElement : HTMLElement {
  [HTMLConstructor] constructor();

  [CEReactions, Reflect] attribute DOMString download;
  [CEReactions, Reflect] attribute USVString ping;
  [CEReactions, Reflect] attribute DOMString rel;
  [SameObject, PutForwards=value, Reflect="rel"] readonly attribute DOMTokenList relList;
  [CEReactions, Reflect] attribute DOMString hreflang;
  [CEReactions, Reflect] attribute DOMString type;

  [CEReactions] attribute DOMString text;

  [CEReactions] attribute DOMString referrerPolicy;

  // also has obsolete members
};
AnchorElement includes HTMLHyperlinkElementUtils;

and then

[Exposed=Window]
interface HTMLAnchorElement : AnchorElement {
  [CEReactions, Reflect] attribute DOMString target;
};

And in MathML...

[Exposed=Window]
interface MathMLMAElement : AnchorElement {
  [CEReactions, Reflect] attribute DOMString target;
};

And in SVG

[Exposed=Window]
interface SVGAElement : AnchorElement {
  [SameObject] readonly attribute SVGAnimatedString target;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    integrationBetter coordination across standards neededneeds implementer interestMoving the issue forward requires implementers to express interesttopic: svg

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions