Skip to content

Commit

Permalink
HTML: window.name
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Feb 14, 2019
1 parent fbbf9a6 commit 8e76fc7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions html/browsers/the-window-object/name-attribute.window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
test(() => {
const frame = document.createElement("iframe"),
name = "A",
name2 = "B";
frame.setAttribute("name", name);
document.body.append(frame);
const frameW = frame.contentWindow;
assert_equals(frameW.name, name);
frameW.name = name2;
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, name2);
frame.remove();
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, "");
frameW.name = name2;
assert_equals(frame.getAttribute("name"), name);
assert_equals(frameW.name, "");
}, "Window object's name IDL attribute");

0 comments on commit 8e76fc7

Please sign in to comment.