diff --git a/index.bs b/index.bs index 5d1df7df..b7700902 100644 --- a/index.bs +++ b/index.bs @@ -12200,16 +12200,14 @@ depending on whether the [{{OverrideBuiltins}}] operates as follows, with property name |P| and object |O|:
    - 1. If |P| is an [=unforgeable property name=] - on |O|, then return false. - 1. If |O| implements an [=interface=] with - an [{{Unforgeable}}]-annotated [=attribute=] - whose [=identifier=] is |P|, then return false. 1. If |P| is not a [=supported property name=] of |O|, then return false. + 1. If |O| has an own property named |P|, then return false. + + Note: This will include cases in which |O| has unforgeable properties, because in practice those are always set up before objects have any supported property names, and once set up will make the corresponding named properties invisible. + 1. If |O| implements an interface that has the [{{OverrideBuiltins}}] [=extended attribute=], then return true. - 1. If |O| has an own property named |P|, then return false. 1. Initialize |prototype| to be the value of the internal \[[Prototype]] property of |O|. 1. While |prototype| is not null: 1. If |prototype| is not a [=named properties object=], @@ -12223,16 +12221,12 @@ operates as follows, with property name |P| and object |O|: This should ensure that for objects with named properties, property resolution is done in the following order: 1. Indexed properties. - 1. Unforgeable attributes and operations. + 1. Own properties, including unforgeable attributes and operations. 1. Then, if [{{OverrideBuiltins}}]: 1. Named properties. - 1. Own properties. 1. Properties from the prototype chain. 1. Otherwise, if not [{{OverrideBuiltins}}]: - 1. Own properties. - 1. Properties from the prototype chain. - 1. Named properties. diff --git a/index.html b/index.html index 298dc083..b4d2ebf3 100644 --- a/index.html +++ b/index.html @@ -1544,7 +1544,7 @@

    Web IDL

    -

    Editor’s Draft,

    +

    Editor’s Draft,

    This version: @@ -11426,17 +11426,13 @@

    OverrideBuiltins] extended attribute was used. The algorithm operates as follows, with property name P and object O:

      -
    1. -

      If P is an unforgeable property name on O, then return false.

      -
    2. -

      If O implements an interface with -an [Unforgeable]-annotated attribute whose identifier is P, then return false.

    3. If P is not a supported property name of O, then return false.

      -
    4. -

      If O implements an interface that has the [OverrideBuiltins] extended attribute, then return true.

    5. If O has an own property named P, then return false.

      +

      Note: This will include cases in which O has unforgeable properties, because in practice those are always set up before objects have any supported property names, and once set up will make the corresponding named properties invisible.

      +
    6. +

      If O implements an interface that has the [OverrideBuiltins] extended attribute, then return true.

    7. Initialize prototype to be the value of the internal [[Prototype]] property of O.

    8. @@ -11457,22 +11453,18 @@

      Indexed properties.

    9. -

      Unforgeable attributes and operations.

      +

      Own properties, including unforgeable attributes and operations.

    10. Then, if [OverrideBuiltins]:

      1. Named properties.

        -
      2. -

        Own properties.

      3. Properties from the prototype chain.

    11. Otherwise, if not [OverrideBuiltins]:

        -
      1. -

        Own properties.

      2. Properties from the prototype chain.

      3. @@ -11501,7 +11493,7 @@

        Let value be an uninitialized variable.

      4. -

        If operation was defined without an identifier, then +

        If operation was defined without an identifier, then set value to the result of performing the steps listed in the interface description to determine the value of an indexed property with index as the index.

      5. Otherwise, operation was defined with an identifier. Set value to the result @@ -11522,7 +11514,7 @@

      6. If O supports named properties, O does not -implement an interface with the [Global] or [PrimaryGlobal] extended attribute, the result of running the named property visibility algorithm with +implement an interface with the [Global] or [PrimaryGlobal] extended attribute, the result of running the named property visibility algorithm with property name P and object O is true, and ignoreNamedProps is false, then:

        1. @@ -11530,7 +11522,7 @@

          Let value be an uninitialized variable.

        2. -

          If operation was defined without an identifier, then +

          If operation was defined without an identifier, then set value to the result of performing the steps listed in the interface description to determine the value of a named property with P as the name.

        3. Otherwise, operation was defined with an identifier. Set value to the result @@ -11555,7 +11547,7 @@

          Return OrdinaryGetOwnProperty(O, P).

        4.8.3. Platform object [[GetOwnProperty]] method

        -

        The internal [[GetOwnProperty]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called with property name P:

        +

        The internal [[GetOwnProperty]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called with property name P:

        1. Return the result of invoking the PlatformObjectGetOwnProperty abstract operation with O, P, and false as @@ -11575,7 +11567,7 @@

          Let value be the result of converting V to an IDL value of type T.

        2. -

          If operation was defined without an identifier, then:

          +

          If operation was defined without an identifier, then:

          1. If creating is true, then perform the steps listed in the interface description to set the value of a new indexed property with index as the index and value as the value.

            @@ -11597,7 +11589,7 @@

            Let value be the result of converting V to an IDL value of type T.

          2. -

            If operation was defined without an identifier, then:

            +

            If operation was defined without an identifier, then:

            1. If creating is true, then perform the steps listed in the interface description to set the value of a new named property with P as the name and value as the value.

              @@ -11608,7 +11600,7 @@

              Otherwise, operation was defined with an identifier. Perform the steps listed in the description of operation with index and value as the two argument values.

            4.8.6. Platform object [[Set]] method

            -

            The internal [[Set]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called +

            The internal [[Set]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called with property name P, value V, and ECMAScript language value Receiver:

              @@ -11643,7 +11635,7 @@

              4.8.7. Platform object [[DefineOwnProperty]] method

              When the internal [[DefineOwnProperty]] method of a platform object O that -implements an interface which supports indexed or named properties is +implements an interface which supports indexed or named properties is called with property key P and Property Descriptor Desc, the following steps must be taken:

              1. @@ -11659,8 +11651,8 @@

                Return true.

            1. -

              If O supports named properties, O does not implement an interface with the -[Global] or [PrimaryGlobal] extended attribute and P is not an unforgeable property name of O, then:

              +

              If O supports named properties, O does not implement an interface with the +[Global] or [PrimaryGlobal] extended attribute and P is not an unforgeable property name of O, then:

              1. Let creating be true if P is not a supported property name, and false otherwise.

                @@ -11684,14 +11676,14 @@

            2. -

              If O does not implement an interface with the +

              If O does not implement an interface with the [Global] or [PrimaryGlobal] extended attribute, then set Desc.[[Configurable]] to true.

            3. Return OrdinaryDefineOwnProperty(O, P, Desc).

            4.8.8. Platform object [[Delete]] method

            -

            The internal [[Delete]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called with property name P.

            +

            The internal [[Delete]] method of every platform object O that implements an interface which supports indexed or named properties must behave as follows when called with property name P.

            1. If O supports indexed properties and P is an array index property name, then:

              @@ -11704,7 +11696,7 @@

              4

              Return false.

          3. -

            If O supports named properties, O does not implement an interface with the +

            If O supports named properties, O does not implement an interface with the [Global] or [PrimaryGlobal] extended attribute and the result of calling the named property visibility algorithm with property name P and object O is true, then:

            1. @@ -11712,7 +11704,7 @@

              4
            2. Let operation be the operation used to declare the named property deleter.

            3. -

              If operation was defined without an identifier, then:

              +

              If operation was defined without an identifier, then:

              1. Perform the steps listed in the interface description to delete an existing named property with P as the name.

                @@ -11742,7 +11734,7 @@

                4

                Return true.

              4.8.9. Platform object [[Call]] method

              -

              The internal [[Call]] method of every platform object O that implements an interface I with at least one legacy caller must behave as follows, assuming arg0..n−1 is the list of argument +

              The internal [[Call]] method of every platform object O that implements an interface I with at least one legacy caller must behave as follows, assuming arg0..n−1 is the list of argument values passed to [[Call]]:

              1. @@ -11756,7 +11748,7 @@

                4.8

              4.8.10. Property enumeration

              This document does not define a complete property enumeration order -for all platform objects implementing interfaces (or for platform objects representing exceptions). +for all platform objects implementing interfaces (or for platform objects representing exceptions). However, if a platform object implements an interface that supports indexed or named properties, then properties on the object must be enumerated in the following order:

              @@ -11766,7 +11758,7 @@

              supported property indices are enumerated first, in numerical order.

            4. -

              If the object supports named properties and doesn’t implement an interface with the +

              If the object supports named properties and doesn’t implement an interface with the [LegacyUnenumerableNamedProperties] extended attribute, then the object’s supported property names that are visible according to the named property visibility algorithm are enumerated next, in the order given in the definition of the set of supported property names.

              @@ -11794,17 +11786,17 @@

              callable. The implementation of the operation (or set of overloaded operations) is the result of invoking the internal [[Get]] method -on the object with a property name that is the identifier of the operation.

              +on the object with a property name that is the identifier of the operation.

            5. Otherwise, the interface is not a single operation callback interface. Any object that is not a native RegExp object is considered to implement the interface. -For each operation declared on the interface with a given identifier, the implementation +For each operation declared on the interface with a given identifier, the implementation is the result of invoking [[Get]] on the object with a property name that is that identifier.

              Note that ECMAScript objects need not have -properties corresponding to constants on them to be considered as user objects implementing interfaces that happen +properties corresponding to constants on them to be considered as user objects implementing interfaces that happen to have constants declared on them.

              A single operation callback interface is a callback interface that:

              @@ -11812,9 +11804,9 @@

              is not declared to inherit from another interface,

            6. -

              has no attributes, and

              +

              has no attributes, and

            7. -

              has one or more regular operations that all have the same identifier, +

              has one or more regular operations that all have the same identifier, and no others.

              To call a user object’s operation, given a callback interface type value value, sometimes-optional operation name opName, @@ -12102,7 +12094,7 @@

              4.11. Namespaces

              For every namespace that is exposed in a given ECMAScript global environment, a corresponding property must exist on the ECMAScript -environment’s global object. The name of the property is the identifier of the namespace, and its value is an object +environment’s global object. The name of the property is the identifier of the namespace, and its value is an object called the namespace object.

              The property has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }. The characteristics of a @@ -12119,7 +12111,7 @@

              Let F be the result of creating an operation function given op, namespace, and realm.

            8. -

              Perform ! CreateDataProperty(namespaceObject, op’s identifier, F).

              +

              Perform ! CreateDataProperty(namespaceObject, op’s identifier, F).

          4.12. Exceptions

          @@ -12208,10 +12200,10 @@

          Let F be the Function object used as the this value in the top-most call -on the ECMAScript call stack where F corresponds to an IDL attribute, operation, indexed property, named property, constructor, named constructor or stringifier.

          +on the ECMAScript call stack where F corresponds to an IDL attribute, operation, indexed property, named property, constructor, named constructor or stringifier.

        3. If F corresponds to an attribute, operation or stringifier, then return -the global environment associated with the interface that definition appears on.

          +the global environment associated with the interface that definition appears on.

        4. Otherwise, if F corresponds to an indexed or named property, then return the global environment associated with the interface that @@ -12328,7 +12320,7 @@

          -

          The following IDL fragment defines two interfaces and an exception. +

          The following IDL fragment defines two interfaces and an exception. The valueOf attribute on ExceptionThrower is defined to throw an exception whenever an attempt is made to get its value.

          interface Dahut {
          @@ -12558,7 +12550,7 @@ 

          IDL gr used in the grammar and the values used for identifier terminals. Thus, for example, the input text “Const” is tokenized as an identifier rather than the -terminal symbol const, an interface with identifier “A” is distinct from one named “a”, and an extended attribute [constructor] will not be recognized as +terminal symbol const, an interface with identifier “A” is distinct from one named “a”, and an extended attribute [constructor] will not be recognized as the [Constructor] extended attribute.

          Implicitly, any number of whitespace and comment terminals are allowed between every other terminal @@ -13032,6 +13024,7 @@

          [HTML] defines the following terms:
        5. - [UNICODE] defines the following terms: - -
        6. - [HTML] defines the following terms: + [secure-contexts] defines the following terms:
        7. - [secure-contexts] defines the following terms: + [UNICODE] defines the following terms:

          References

          @@ -13222,15 +13210,14 @@

          I
        8. 4.6.9.4. Default iterator objects
        9. 4.6.9.5. Iterator prototype object
        10. 4.8. Platform objects implementing interfaces -
        11. 4.8.1. Indexed and named properties -
        12. 4.8.2. The PlatformObjectGetOwnProperty abstract operation (2) -
        13. 4.8.4. Invoking a platform object indexed property setter -
        14. 4.8.5. Invoking a platform object named property setter -
        15. 4.8.8. Platform object [[Delete]] method -
        16. 4.9. User objects implementing callback interfaces (2) (3) -
        17. 4.11. Namespaces -
        18. 4.11.1. Namespace object -
        19. IDL grammar +
        20. 4.8.2. The PlatformObjectGetOwnProperty abstract operation (2) +
        21. 4.8.4. Invoking a platform object indexed property setter +
        22. 4.8.5. Invoking a platform object named property setter +
        23. 4.8.8. Platform object [[Delete]] method +
        24. 4.9. User objects implementing callback interfaces (2) (3) +
        25. 4.11. Namespaces +
        26. 4.11.1. Namespace object +
        27. IDL grammar