From 03f25f453d06ffb63a681535246c28e51d0018bf Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Let the adjusted insertion location be the appropriate place for inserting a node.
Create an element for the token in the given namespace, with the intended + + +
Let element be the result of creating an element for the token in the given namespace, with the intended parent being the element in which the adjusted insertion location finds itself.
If it is possible to insert element at the adjusted insertion location, + then:
+ +Push a new element queue onto the custom element reactions + stack.
If it is possible to insert an element at the adjusted insertion - location, then insert the newly created element at the adjusted insertion - location.
+Insert element at the adjusted insertion location.
If the adjusted insertion location cannot accept more
- elements, e.g. because it's a Document
that already has an element child, then the
- newly created element is dropped on the floor.
Pop the element queue from the custom element reactions stack, + and invoke custom element reactions in that queue.
If the adjusted insertion location cannot accept more
+ elements, e.g. because it's a Document
that already has an element child, then
+ element is dropped on the floor.
Push the element onto the stack of open elements so that it is the new +
Push element onto the stack of open elements so that it is the new current node.
Return the newly created element.
Return element.
When the steps below require the user agent to insert an HTML element for a token,