whatwg/dom

Missing arguments for “locate a namespace prefix” in `lookupPrefix` steps

bhathos opened this issue · 1 comments

In the lookupPrefix operation steps, there are three “invocations” of the “locate a namespace prefix” algorithm which only pass its element argument, not its namespace argument:

  • “the result of locating a namespace prefix for its document element
  • “the result of locating a namespace prefix for its element
  • “the result of locating a namespace prefix for its parent element

Unless there’s a calling convention that I’m unaware of that makes it implicit that the local namespace “variable” should be passed down, this seems like a mistake. Note that in the Element case, namespace is already explicitly passed:

  • “the result of locating a namespace prefix for it using namespace

Nice find. This has been broken forever: 43213ed.

I suspect that in all these cases we need to pass namespace on. The test I added at the time suggests the same. I guess I should fix this.