18 lines
1.0 KiB
Plaintext
18 lines
1.0 KiB
Plaintext
Make sure DOM attributes handle different types of |this| properly
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
PASS objectWithDocumentAsPrototype.all threw exception TypeError: The Document.all getter can only be used on instances of Document.
|
|
See what happens if we put the anchor prototype on a div
|
|
PASS testDiv instanceof HTMLAnchorElement is true
|
|
PASS testDiv.href threw exception TypeError: The HTMLAnchorElement.href getter can only be used on instances of HTMLAnchorElement.
|
|
PASS testDiv.href='error' threw exception TypeError: The HTMLAnchorElement.href setter can only be used on instances of HTMLAnchorElement.
|
|
PASS testDiv instanceof HTMLAnchorElement is true
|
|
PASS testDiv.href threw exception TypeError: The HTMLAnchorElement.href getter can only be used on instances of HTMLAnchorElement.
|
|
PASS testDiv.href='error' threw exception TypeError: The HTMLAnchorElement.href setter can only be used on instances of HTMLAnchorElement.
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|