Skip to content

Replaceable attribute window.performance #1193

Closed
@legendecas

Description

@legendecas

https://webidl.spec.whatwg.org/#Replaceable defines that a replaceable attribute should be an IDL attribute (accessor pair defined on the prototype instead of the instance objects), whilst it can be replaced with shadowing the prototype accessor when setting the corresponding property on the platform object, like the https://webidl.spec.whatwg.org/#example-fe2bdbf4 shows.

window.performance is defined as a replaceable attribute on WindowOrWorkerGlobalScope. Major browser implementations (Chrome, Safari, Firefox) seem to be diverging from the definition of a replaceable attribute:

window. hasOwnProperty('performance'); // => true, should be false according to the definition.
Object.getPrototypeOf(window).hasOwnProperty('performance'); // => false, should be true

Is this an implementation bug, or should we update the spec to reflect what the reality is?

Refs: nodejs/node#44483 (comment)

Metadata

Metadata

Assignees

No one assigned

    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