From 07e9fc014ba54a185cb8c62016f088fd9181be6f Mon Sep 17 00:00:00 2001 From: Simon Pieters Date: Thu, 26 Nov 2015 10:56:12 +0100 Subject: [PATCH] Fix #119: merge DOMSettableTokenList into DOMTokenList Move DOMSettableTokenList#value to DOMTokenList and remove the DOMSettableTokenList interface. --- dom.bs | 37 +++++++++++++------------------------ dom.html | 38 ++++++++++++++------------------------ 2 files changed, 27 insertions(+), 48 deletions(-) diff --git a/dom.bs b/dom.bs index 715f6a53..02e664d7 100644 --- a/dom.bs +++ b/dom.bs @@ -5041,7 +5041,7 @@ interface Element : Node { attribute DOMString id; attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; @@ -8561,8 +8561,7 @@ These constants can be used for the

Sets

-

Yes, the names {{DOMTokenList}} and {{DOMSettableTokenList}} -are unfortunate legacy mishaps. +

Yes, the name {{DOMTokenList}} is an unfortunate legacy mishap.

Interface {{DOMTokenList}}

@@ -8576,6 +8575,7 @@ interface DOMTokenList { boolean toggle(DOMString token, optional boolean force); void replace(DOMString token, DOMString newToken); boolean supports(DOMString token); + attribute DOMString value; stringifier; iterable<DOMString>; }; @@ -8690,6 +8690,11 @@ associated element's

Returns true if token is in the associated attribute's supported tokens. Returns false otherwise.

Throws a TypeError exception if the associated attribute has no supported tokens defined. + +

tokenlist . {{DOMTokenList/value}} +
+

Returns the associated set as string. +

Can be set, to change the associated attribute.

The length attribute' getter must return the @@ -8822,32 +8827,15 @@ method, when invoked, must run these steps:

  • Return result. -

    The stringification behavior -must return the result of running context object's serialize steps. - - -

    Interface {{DOMSettableTokenList}}

    - -
    -interface DOMSettableTokenList : DOMTokenList {
    -            attribute DOMString value;
    -};
    -
    - -
    -
    tokenlist . {{DOMSettableTokenList/value}} -
    -

    Returns the associated set as string. -

    Can be set, to change the associated attribute. -

    - -

    The value attribute must return the +

    The value attribute must return the result of running context object's serialize steps. -

    Setting the {{DOMSettableTokenList/value}} attribute must set an attribute value for the +

    Setting the {{DOMTokenList/value}} attribute must set an attribute value for the associated element using associated attribute's local name and the given value. +

    The stringification behavior +must return the result of running context object's serialize steps.

    Historical

    @@ -9153,6 +9141,7 @@ Stig Halvorsen, Tab Atkins, timeless, Timo Tijhof, +Tobie Langel, Tom Pixley, Travis Leithead, Vidur Apparao, diff --git a/dom.html b/dom.html index ba788f89..46d8d8fd 100644 --- a/dom.html +++ b/dom.html @@ -184,7 +184,6 @@

    Table of Contents

    7 Sets
    1. 7.1 Interface DOMTokenList -
    2. 7.2 Interface DOMSettableTokenList
  • 8 Historical @@ -2754,7 +2753,7 @@

    id; attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; @@ -4173,7 +4172,7 @@

    SHOW_DOCUMENT_FRAGMENT (1024, 400 in hexadecimal).

    7. Sets

    -

    Yes, the names DOMTokenList and DOMSettableTokenList are unfortunate legacy mishaps.

    +

    Yes, the name DOMTokenList is an unfortunate legacy mishap.

    7.1. Interface DOMTokenList

    interface DOMTokenList {
       readonly attribute unsigned long length;
    @@ -4184,6 +4183,7 @@ 

    toggle(DOMString token, optional boolean force); void replace(DOMString token, DOMString newToken); boolean supports(DOMString token); + attribute DOMString value; stringifier; iterable<DOMString>; }; @@ -4259,6 +4259,10 @@

    Returns true if token is in the associated attribute’s supported tokens. Returns false otherwise.

    Throws a TypeError exception if the associated attribute has no supported tokens defined.

    +
    tokenlist . value +
    +

    Returns the associated set as string.

    +

    Can be set, to change the associated attribute.

    The length attribute' getter must return the number of tokens in the tokens.

    @@ -4357,23 +4361,12 @@

    Return result.

    -

    The stringification behavior must return the result of running context object’s serialize steps.

    -

    7.2. Interface DOMSettableTokenList

    -
    interface DOMSettableTokenList : DOMTokenList {
    -            attribute DOMString value;
    -};
    -
    -
    -
    tokenlist . value -
    -

    Returns the associated set as string.

    -

    Can be set, to change the associated attribute.

    -
    -

    The value attribute must return the +

    The value attribute must return the result of running context object’s serialize steps.

    -

    Setting the value attribute must set an attribute value for the +

    Setting the value attribute must set an attribute value for the associated element using associated attribute’s local name and the given value.

    +

    The stringification behavior must return the result of running context object’s serialize steps.

    8. Historical

    As explained in goals this specification is a significant revision of various DOM specifications. This section attempts to @@ -4600,6 +4593,7 @@

    Acknowledgmen Stig Halvorsen, Tab Atkins, timeless, Timo Tijhof, +Tobie Langel, Tom Pixley, Travis Leithead, Vidur Apparao, @@ -4833,7 +4827,6 @@

    DOMImplementationSource, in §8.2
  • DOMLocator, in §8.2
  • DOMObject, in §8.2 -
  • DOMSettableTokenList, in §7.2
  • DOMStringList, in §8.2
  • DOMTokenList, in §7.1
  • DOMUserData, in §8.2 @@ -5368,7 +5361,7 @@

  • dfn for Attr, in §4.8.2
  • attribute for Attr, in §4.8.2 -
  • attribute for DOMSettableTokenList, in §7.2 +
  • attribute for DOMTokenList, in §7.1
  • webkitMatchesSelector(selectors), in §4.8
  • @@ -5765,7 +5758,7 @@

    IDL Inde attribute DOMString id; attribute DOMString className; - [SameObject] readonly attribute DOMTokenList classList; + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; boolean hasAttributes(); [SameObject] readonly attribute NamedNodeMap attributes; @@ -5951,14 +5944,11 @@

    IDL Inde boolean toggle(DOMString token, optional boolean force); void replace(DOMString token, DOMString newToken); boolean supports(DOMString token); + attribute DOMString value; stringifier; iterable<DOMString>; }; -interface DOMSettableTokenList : DOMTokenList { - attribute DOMString value; -}; -

  • \ No newline at end of file