Skip to content

ObservableArray types in namespace #1000

Closed
@EdgarChen

Description

@EdgarChen

per https://heycam.github.io/webidl/#idl-observable-array,

Observable array types must only be used as the type of regular attributes.

and readonly regular attributes can be a namespace member, so it seems

namespace A {
  readonly attribute ObservableArray<boolean> foo;
};

is allowed.

But in https://heycam.github.io/webidl/#dfn-attribute-getter, we check if the target is interface

  1. if target is an interface, and attribute is a regular attribute:
    ....
    4. If attribute’s type is an observable array type, then return esValue’s backing observable array exotic object for attribute.

which makes ObservableArray type in namespace doesn't work.

cc @domenic

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions