Closed Bug 1974950 Opened 10 months ago Closed 10 months ago

Do not throw if DOM attribute setter is called with no arguments

Categories

(Core :: DOM: Bindings (WebIDL), task)

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: arai, Assigned: arai)

References

()

Details

Attachments

(2 files)

for https://github.com/whatwg/webidl/issues/1497

The spec requires the DOM attribute setter to throw if it's called with no arguments, but the behavior doesn't match across browsers,
and also throwing there doesn't match ECMAScript built-ins.

The possible fix is to modify the spec not to throw, but treat it as undefined value, and update implementation to follow it.

I have a patch, and will post it shortly

Attachment #9497828 - Attachment description: Bug 1974950 - Part 1: Treat no arguments as undefined in DOM setters. r=smaug → Bug 1974950 - Part 1: Treat no arguments as undefined in DOM setters. r=smaug!
Attachment #9497829 - Attachment description: Bug 1974950 - Part 2: Add tests for DOM attribute setter with no arguments r=smaug → Bug 1974950 - Part 2: Add tests for DOM attribute setter with no arguments r=smaug!

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:arai, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(krosylight)
Flags: needinfo?(arai.unmht)

I see no blocker to land 👀

Flags: needinfo?(krosylight)

it's waiting for https://github.com/whatwg/webidl/pull/1498 to become ready to merge,
so that we can land the spec change and the WPT at the same time.

I'll check if/how Node is affected.

Flags: needinfo?(arai.unmht)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/53894 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: