Intent to Implement and Ship: Support HTMLAnchorElement.relList property

98 views
Skip to first unread message

bhagir...@samsung.com

unread,
Jan 4, 2018, 9:32:02 AM1/4/18
to blink-dev

Contact emails

bhagir...@samsung.com

 

Explainer

None. Feature is already in spec.

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

 

 

Design doc/Spec

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/relList

 

Summary

The HTMLAnchorElement.relList read-only property reflects the rel attribute. It is a live DOMTokenList containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.

 

Motivation

The motivation of implementing HTMLAnchorElement.relList property to improve interoperability and compatibility as per W3C spec and support to web developers who use AnchorElement relList  property. Firefox and Safari are already supporting this feature.

 

Risks

Interoperability and Compatibility

This property is already implemented in Firefox and Safari so there no compatibility issues. Also, since this is a new API so this will not break any existing functionalities.

 

Edge: No signals

Firefox: Shipped

Safari: Shipped

Web developers: In favor of interoperability.

 

Ergonomics

This is part of W3C spec.

 

Activation

This is part of W3C spec so can be used by web developers directly.

 

Debuggability

None

 

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

 

Is this feature fully tested by web-platform-tests?

wpt/html/dom/ and wpt/html/semantics/text-level-semantics/the-a-element/ are the impacted test suites.

https://wpt.fyi/html/dom/interfaces.html

 

Link to entry on the feature dashboard

https://www.chromestatus.com/features/5631885325631488

 

Requesting approval to ship?

Yes

Yoav Weiss

unread,
Jan 4, 2018, 4:25:40 PM1/4/18
to bhagir...@samsung.com, blink-dev
On Thu, Jan 4, 2018 at 3:32 PM <bhagir...@samsung.com> wrote:

Contact emails

bhagir...@samsung.com

 

Explainer

None. Feature is already in spec.

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

 

 

Design doc/Spec

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/relList

 

Summary

The HTMLAnchorElement.relList read-only property reflects the rel attribute. It is a live DOMTokenList containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.

 

Motivation

The motivation of implementing HTMLAnchorElement.relList property to improve interoperability and compatibility as per W3C spec and support to web developers who use AnchorElement relList  property. Firefox and Safari are already supporting this feature.

 

Risks

Interoperability and Compatibility

This property is already implemented in Firefox and Safari so there no compatibility issues. Also, since this is a new API so this will not break any existing functionalities.

 

Edge: No signals

Firefox: Shipped

Safari: Shipped

Web developers: In favor of interoperability.


Could you add links here?
 

 

Ergonomics

This is part of W3C spec.

 

Activation

This is part of W3C spec so can be used by web developers directly.

 

Debuggability

None

 

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

 

Is this feature fully tested by web-platform-tests?

wpt/html/dom/ and wpt/html/semantics/text-level-semantics/the-a-element/ are the impacted test suites.

https://wpt.fyi/html/dom/interfaces.html


Does the feature also have a test suite making sure it exposes the right values? If not, could you add one?
Can you also make sure the values exposed in other browsers that ship the feature comply with the spec? 
 

 

Link to entry on the feature dashboard

https://www.chromestatus.com/features/5631885325631488

 

Requesting approval to ship?

Yes

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f845a61a-af72-4c0e-8ea7-fef5cf521c4d%40chromium.org.

Todd Reifsteck

unread,
Jan 4, 2018, 6:19:48 PM1/4/18
to Yoav Weiss, bhagir...@samsung.com, blink-dev

Edge 17 implements relList.

 

Thanks!

Todd

bhagir...@samsung.com

unread,
Jan 5, 2018, 2:09:51 AM1/5/18
to blink-dev, bhagir...@samsung.com


On Friday, January 5, 2018 at 2:55:40 AM UTC+5:30, Yoav Weiss wrote:


On Thu, Jan 4, 2018 at 3:32 PM <bhagir...@samsung.com> wrote:

Contact emails

bhagir...@samsung.com

 

Explainer

None. Feature is already in spec.

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

 

 

Design doc/Spec

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/relList

 

Summary

The HTMLAnchorElement.relList read-only property reflects the rel attribute. It is a live DOMTokenList containing the set of link types indicating the relationship between the resource represented by the <a> element and the current document.

 

Motivation

The motivation of implementing HTMLAnchorElement.relList property to improve interoperability and compatibility as per W3C spec and support to web developers who use AnchorElement relList  property. Firefox and Safari are already supporting this feature.

 

Risks

Interoperability and Compatibility

This property is already implemented in Firefox and Safari so there no compatibility issues. Also, since this is a new API so this will not break any existing functionalities.

 

Edge: No signals

Firefox: Shipped

Safari: Shipped

Web developers: In favor of interoperability.


Could you add links here?
  
  I found a link where mentioned "Chrome and Chromium based browsers support relList on link elements, but not anchor elements" . Also we can see the Usage relative in this        link and it is partially supported in chrome.
      
 

 

Ergonomics

This is part of W3C spec.

 

Activation

This is part of W3C spec so can be used by web developers directly.

 

Debuggability

None

 

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

 

Is this feature fully tested by web-platform-tests?

wpt/html/dom/ and wpt/html/semantics/text-level-semantics/the-a-element/ are the impacted test suites.

https://wpt.fyi/html/dom/interfaces.html


Does the feature also have a test suite making sure it exposes the right values? If not, could you add one?
Can you also make sure the values exposed in other browsers that ship the feature comply with the spec? 
 
    As I checked, functional tests are not covered in web-platform-tests.
    I am adding here one example(referred from  https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/relList) which we can add in wpt test suite.
    This test case print error "Uncaught TypeError: Cannot read property 'length' of undefined" in Chrome where as in Firefox, values are printed without error.
    <body>
    <a rel="test"></a>
    <script>
    var anchors = document.getElementsByTagName("a");
    var length = anchors.length;
    for (var i = 0; i < length; i++) {
      var list = anchors[i].relList;
      var listLength = list.length;
      console.log("New area found.");
      for (var j = 0; j < listLength; j++) {
        console.log(list[j]);
      }
   }
  </script>
  </body>

Jochen Eisinger

unread,
Jan 5, 2018, 9:25:52 AM1/5/18
to blink-dev, bhagir...@samsung.com
lgtm1 but please add wpt while implementing

Boris Zbarsky

unread,
Jan 5, 2018, 10:50:53 AM1/5/18
to blink-dev
On 1/5/18 2:09 AM, bhagir...@samsung.com wrote:
>> Can you also make sure the values exposed in other browsers that
>> ship the feature comply with the spec?
>
>     As I checked, functional tests are not covered in web-platform-tests.

The problem is that the values exposed should depend on which features
the UA implements. It's not quite trivial to test this in an automated
fashion.

-Boris

P.S. The lack of relList on HTMLAnchorElement in Chrome has actually
been a serious problem for web developers, because it means they can't
feature-detect noopener support. So I am very happy this is finally
getting fixed.

bhagir...@samsung.com

unread,
Jan 6, 2018, 2:49:17 AM1/6/18
to blink-dev, bhagir...@samsung.com
Surely, I shall add wpt while implementing. Thanks!

Yoav Weiss

unread,
Jan 8, 2018, 1:08:20 AM1/8/18
to bhagir...@samsung.com, blink-dev

Yoav Weiss

unread,
Jan 8, 2018, 9:30:39 AM1/8/18
to Boris Zbarsky, blink-dev
On Fri, Jan 5, 2018 at 4:50 PM Boris Zbarsky <bzba...@mit.edu> wrote:
On 1/5/18 2:09 AM, bhagir...@samsung.com wrote:
>>    Can you also make sure the values exposed in other browsers that
>>    ship the feature comply with the spec?
>
>      As I checked, functional tests are not covered in web-platform-tests.

The problem is that the values exposed should depend on which features
the UA implements.  It's not quite trivial to test this in an automated
fashion.

I agree this is a not great, but I'd prefer having a not-perfect test over nothing. So, a test that shows "ideal" support and have each UA set their test expectations according to their actual support seems good enough.


-Boris

P.S.  The lack of relList on HTMLAnchorElement in Chrome has actually
been a serious problem for web developers, because it means they can't
feature-detect noopener support.  So I am very happy this is finally
getting fixed.

That's a very good point! :)
 

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Boris Zbarsky

unread,
Jan 8, 2018, 11:55:44 AM1/8/18
to blink-dev
On 1/8/18 9:30 AM, Yoav Weiss wrote:
> I agree this is a not great, but I'd prefer having a not-perfect test
> over nothing. So, a test that shows "ideal" support and have each UA set
> their test expectations according to their actual support seems good enough.

The paranoid in me worries about engines adding things to relList to
pass the test without actually supporting those values in any useful
way. But maybe that's just paranoia and people know better than to do
things like that by now...

-Boris

Daniel Bratell

unread,
Jan 8, 2018, 12:17:16 PM1/8/18
to bhagir...@samsung.com, Yoav Weiss, blink-dev
LGTM3

/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEjiWMwVUu399kTjf9PQj15P421QV2dOx-W%2BrEUd0Vxrgw%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

bhagir...@samsung.com

unread,
Jan 9, 2018, 5:36:06 AM1/9/18
to blink-dev
Below patch has been submitted for this feature implementation.
Reply all
Reply to author
Forward
0 new messages