W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

[whatwg] Undefined action parsing HTML fragment with <select> context

From: Nolan Waite <nolan@nolanw.ca>
Date: Sun, 21 Jul 2013 04:43:12 -0300
Message-Id: <B2248B54-4147-4324-A519-421C93DE127F@nolanw.ca>
To: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
Hello! I am confused about parsing an HTML fragment when the context is a "select" element. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#parsing-html-fragments step 4.6 instructs me to "reset the parser's insertion mode appropriately". I head over to http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#parsing-html-fragments but I see a problem in step 4.

In step 4.1 I let ancestor = node. At this point, I have:

- stack of open elements =
    - <html>
- last = true
- node = the context element, a "select" element
- ancestor = the context element, a "select" element

In step 4.2 ancestor is not the first node in the stack of open elements (the context "select" element is not and has never been on the stack), so I continue to step 4.3.

Now I am to "let ancestor be the node before ancestor in the stack of open elements". There is no such node! At this point, ancestor is not on the stack of open elements, so there is no node "before" it.

I assume the intention is to effectively jump to the step labeled *done* if ancestor is the context element? That makes sense to me.
Received on Sunday, 21 July 2013 07:43:54 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC