8000 Is it expected that Document has [LegacyOverrideBuiltIns]? · Issue #9394 · whatwg/html · GitHub
[go: up one dir, main page]

Skip to content

Is it expected that Document has [LegacyOverrideBuiltIns]? #9394

@yuki3

Description

@yuki3

I have a question. Maybe I'm just misunderstanding. Please correct me if I'm wrong.

https://html.spec.whatwg.org/multipage/dom.html#htmlorsvgscriptelement

[LegacyOverrideBuiltIns]
partial interface Document {
...(snip)...

// DOM tree accessors
getter object (DOMString name);

Document interface has [LegacyOverrideBuiltIns] in HTML spec. However, Chromium (Blink) doesn't implement [LegacyOverrideBuiltIns] on window.document nor Document nor HTMLDocument. As far as I tested with Firefox and Safari, Firefox and Safari also look not implementing [LegacyOverrideBuiltIns]. If so, is it really the consensus to have [LegacyOverrideBuiltIns]?

I ran the following JS code on Firefox and Safari JS console. The results were the same on both browsers.

document.foo = 3;
form = document.createElement('form');
form.name = 'foo';

document.foo;  // => 3
document.body.appendChild(form);
document.foo;  // => 3 (not `form`)
delete document.foo;  // => true
document.foo;  // => <form name="foo">

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

      0