[Webkit-unassigned] [Bug 148765] prepend should throw when it's called on a node without children

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 3 19:15:00 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=148765

--- Comment #3 from Chris Dumez <cdumez at apple.com> ---
Maybe you were referring to the following check in the test?
===
    test(function() {
        var parent = node.cloneNode();
        assert_throws('HierarchyRequestError', function() { parent.prepend('text'); });
        assert_array_equals(parent.childNodes, []);
    }, 'Document.prepend() with text as an argument, on a Document having no child.');
===

If so, the reason this is expected to throw is because the parent is a Document and the child is a Text Node (step 5 of https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150904/376e2e0c/attachment.html>


More information about the webkit-unassigned mailing list