diff --git a/index.bs b/index.bs index 3e226f638..588a66dfc 100644 --- a/index.bs +++ b/index.bs @@ -12088,29 +12088,17 @@ A [=regular operation=] that does not [=have default method steps=] must not be 1. Return |stack|. -
A
,
- and [=interface mixins=], which are [=included=] by A
or
- by A
's [=inherited interfaces=],
- as show in the below inheritance tree.
-
- - C* - M4 - | - B - M3 - | - M1 - A - M2* -- - [=Interfaces=] and [=interface mixins=] marked with an asterisk ("*") - declare a
toJSON
[=operation=]
- with a [{{Default}}] [=extended attribute=].
+ Only [=regular attributes=] of [=interfaces=] declare a toJSON
[=operation=]
+ with a [{{Default}}] [=extended attribute=] are included, even if an
+ [=inherited interfaces=] declares such a toJSON
[=operation=]. For example,
+ consider the following [=IDL fragment=]:
[Exposed=Window] interface A : B { + [Default] object toJSON(); attribute DOMString a; }; @@ -12124,50 +12112,24 @@ A [=regular operation=] that does not [=have default method steps=] must not be [Default] object toJSON(); attribute DOMString c; }; - - interface mixin M1 { - attribute DOMString m1; - }; - - interface mixin M2 { - [Default] object toJSON(); - attribute DOMString m2; - }; - - interface mixin M3 { - attribute DOMString m3; - }; - - interface mixin M4 { - attribute DOMString m4; - }; - - A includes M1; - A includes M2; - B includes M3; - C includes M4;- Calling the
toJSON()
method of an object
- implementing interface A
defined above
- would return the following JSON object:
+ Calling the toJSON()
method of an object implementing interface
+ A
defined above would return the following JSON object:
{ "a": "...", - "m1": "...", - "m2": "...", - "c": "...", - "m4": "..." + "c": "..." }- An object implementing interface
B
would return:
+ Calling the toJSON()
method of an object implementing interface
+ B
(or C
) defined above would return:
{ - "c": "...", - "m4": "..." + "c": "..." }