From fb45d52fd419193ac05f6b19e624e5e62b2e9279 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 25 Nov 2015 16:21:20 +0100 Subject: [PATCH] Fix #115: add getAttributeNames() --- dom.bs | 9 +++++++++ dom.html | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index f407feacb..d85bd9221 100644 --- a/dom.bs +++ b/dom.bs @@ -5018,6 +5018,7 @@ interface Element : Node { boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; + sequence<DOMString> getAttributeNames(); DOMString? getAttribute(DOMString name); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); void setAttribute(DOMString name, DOMString value); @@ -5416,6 +5417,13 @@ otherwise. The attributes attribute must return the associated {{NamedNodeMap}}. +The getAttributeNames() method, when invoked, must return +the qualified names of the attributes in the context object's +attribute list, in order. + +

These are not guaranteed to be unique. + The getAttribute(name) method must run these steps:

  1. Let attr be the result of @@ -9043,6 +9051,7 @@ Dominic Cooney, Dominique Hazaël-Massieux, Don Jordan, Doug Schepers, +Elliott Sprehn, Erik Arvidsson, Gavin Nicol, Geoffrey Sneddon, diff --git a/dom.html b/dom.html index 3bcacffa9..7123d2fc8 100644 --- a/dom.html +++ b/dom.html @@ -69,7 +69,7 @@

    DOM

    -

    Living Standard — Last Updated

    +

    Living Standard — Last Updated

    Participate: @@ -2675,6 +2675,7 @@

    hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; + sequence<DOMString> getAttributeNames(); DOMString? getAttribute(DOMString name); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); void setAttribute(DOMString name, DOMString value); @@ -2845,6 +2846,9 @@

    context object’s attribute list is empty, and true otherwise.

    The attributes attribute must return the associated NamedNodeMap.

    +

    The getAttributeNames() method, when invoked, must return +the qualified names of the attributes in the context object’s attribute list, in order.

    +

    These are not guaranteed to be unique.

    The getAttribute(name) method must run these steps:

    1. Let attr be the result of getting an attribute given name and the context object. @@ -4396,6 +4400,7 @@

      Acknowledgmen Dominique Hazaël-Massieux, Don Jordan, Doug Schepers, +Elliott Sprehn, Erik Arvidsson, Gavin Nicol, Geoffrey Sneddon, @@ -4821,6 +4826,7 @@

      get an attribute by name, in §4.8
    2. get an attribute by namespace and local name, in §4.8
    3. getAttribute(name), in §4.8 +
    4. getAttributeNames(), in §4.8
    5. getAttributeNode(name), in §4.8
    6. getAttributeNodeNS(namespace, localName), in §4.8
    7. getAttributeNS(namespace, localName), in §4.8 @@ -5832,6 +5838,7 @@

      IDL Inde boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; + sequence<DOMString> getAttributeNames(); DOMString? getAttribute(DOMString name); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); void setAttribute(DOMString name, DOMString value);