beforebegin

afterbegin

beforeend

afterend

Summary

Found 8 tests

Details

ResultTest NameMessage
PassinsertAdjacentHTML(beforebegin, <div><h3>beforebegin</h3></div> )
PassinsertAdjacentHTML(afterbegin, <div><h3>afterbegin</h3></div> )
PassinsertAdjacentHTML(beforeend, <div><h3>beforeend</h3></div> )
PassinsertAdjacentHTML(afterend, <div><h3>afterend</h3></div> )
FailW3C editors spec: Throws a TypeError exception if the position argument has an invalid value.assert_throws: function "function() { el.insertAdjacentHTML("giberish", "giberis..." threw object "SyntaxError: Failed to execute 'insertAdjacentHTML' on 'E..." ("SyntaxError") expected object "TypeError" ("TypeError")
PassWhatWG editors spec: Throws a DOM SyntaxError exception if the position argument has an invalid value.
FailThrows a DOMException with name NoModificationAllowedError if the given position isn't possible. Inserting elements before the root element of a Document.assert_throws: function "function() { var root = document.documentElement; htm..." threw object "ReferenceError: html is not defined" that is not a DOMException NoModificationAllowedError: property "code" is equal to undefined, expected 7
FailThrows a DOMException with name NoModificationAllowedError if the given position isn't possible. Inserting elements after the end of the root element of a Document.assert_throws: function "function() { var root = document.documentElement; htm..." threw object "ReferenceError: html is not defined" that is not a DOMException NoModificationAllowedError: property "code" is equal to undefined, expected 7