Skip to content

Differences between "normal" platform objects and "normal" JavaScript classes #226

Open
@annevk

Description

@annevk

Some are mentioned in tc39/proposals#30 (comment) by @domenic:

  • enumerable (Web IDL) vs. non-enumerable (conventional for ES)
  • statics being functions (Web IDL) vs. methods (conventional for ES)

I believe in Gecko at least typeof will also be different.

This means for instance that https://streams.spec.whatwg.org/ cannot be done in IDL and that https://url.spec.whatwg.org/ expressed in TC39-language would have slightly different behavior.

That seems suboptimal, especially if there's still hope to eventually bridge the chasm somehow.

As a start, having it clearly documented how "normal" platform objects differ from "normal" JavaScript classes would be good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions