link-rellist.html (1251B)
1 <!DOCTYPE html> 2 <title>link.relList: non-string contains</title> 3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> 4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element"> 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#domtokenlist"> 6 <link rel="help" href="https://webidl.spec.whatwg.org/#ecmascript-binding"> 7 <link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=57"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <link id="link" rel="undefined null 0 NaN Infinity"> 11 <div id="log"></div> 12 <script> 13 test(function() { 14 var list = document.getElementById("link").relList; 15 assert_equals(list.contains(undefined), true); //"undefined" 16 assert_equals(list.contains(null), true); //"null" 17 assert_equals(list.contains(-0), true); //"0" 18 assert_equals(list.contains(+0), true); //"0" 19 assert_equals(list.contains(NaN), true); //"NaN" 20 assert_equals(list.contains(+Infinity), true); //"Infinity" 21 assert_equals(list.contains(-Infinity), false); //"-Infinity" 22 assert_equals(list.supports("stylesheet"), true); 23 assert_equals(list.supports("nosuchrelvalueever"), false); 24 }); 25 </script>