mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement HTMLAnchorElement.rel getter and setter
Signed-off-by: Ying-Ruei Liang(KK) <thumbd03803@gmail.com>
This commit is contained in:
parent
2084ee29c4
commit
bb6d52971a
13 changed files with 103 additions and 110 deletions
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>HTMLAnchorElement.rel getter</title>
|
||||
<link rel="author" title="TheKK" href="mailto:thumbd03803@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-a-rel">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<div>
|
||||
<a id="test" href="a" rel="noreferrer"></a>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
var a = document.getElementById("test");
|
||||
|
||||
test(function() {
|
||||
assert_equals(a.rel, "noreferrer");
|
||||
}, "Test anchor's rel getter");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<title>HTMLAnchorElement.rel setter</title>
|
||||
<link rel="author" title="TheKK" href="mailto:thumbd03803@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-a-rel">
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<div>
|
||||
<a id="test" href="a"></a>
|
||||
</div>
|
||||
<script>
|
||||
test(function() {
|
||||
var a = document.getElementById("test");
|
||||
|
||||
test(function() {
|
||||
a.rel = "noreferrer"
|
||||
assert_equals(a.rel, "noreferrer");
|
||||
}, "Test anchor's rel setter");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue