From e8e6516e06730c4e49f371f69955d33b33155f28 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 13 Aug 2024 15:44:36 +0200 Subject: [PATCH] Correct lookupPrefix() after fourteen years Since it was introduced in https://github.com/whatwg/dom/commit/43213eda4f80407950a897cc0b654ded5615809e we never invoked locating a namespace prefix correctly. Fixes #1302. --- dom.bs | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/dom.bs b/dom.bs index a5f9b88c..b88118ee 100644 --- a/dom.bs +++ b/dom.bs @@ -4899,23 +4899,39 @@ the interface node implements:
{{Element}} -

Return the result of locating a namespace prefix for it using namespace. +

Return the result of locating a namespace prefix for this using + namespace.

{{Document}} -

Return the result of locating a namespace prefix for its document element, - if its document element is non-null; otherwise null. +

+
    +
  1. If this's document element is null, then return null. + +

  2. Return the result of locating a namespace prefix for this's + document element using namespace. +

{{DocumentType}}
{{DocumentFragment}}

Return null.

{{Attr}} -

Return the result of locating a namespace prefix for its element, - if its element is non-null; otherwise null. +

+
    +
  1. If this's element is null, then return null. + +

  2. Return the result of locating a namespace prefix for this's + element using namespace. +

Otherwise -

Return the result of locating a namespace prefix for its parent element, if - its parent element is non-null; otherwise null. +

+
    +
  1. If this's parent element is null, then return null. + +

  2. Return the result of locating a namespace prefix for this's + parent element using namespace. +

@@ -10355,6 +10371,7 @@ Cyrille Tuzi, Dan Burzo, Daniel Clark, Daniel Glazman, +Darien Maillet Valentine, Darin Fisher, David Bruant, David Flanagan, @@ -10432,7 +10449,7 @@ Manish Tripathi, Marcos Caceres, Mark Miller, Martijn van der Ven, -Mason Freed, +Mason Freed, Mats Palmgren, Mounir Lamouri, Michael Stramel, @@ -10489,7 +10506,7 @@ Tobie Langel, Tom Pixley, Travis Leithead, Trevor Rowbotham, -triple-underscore, +triple-underscore, Tristan Fraipont, Veli Şenol, Vidur Apparao,