Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'formdata' event should bubble. #4422

Merged
merged 1 commit into from
Mar 8, 2019

Conversation

tkent-google
Copy link
Contributor

@tkent-google tkent-google commented Mar 8, 2019

This is a follow-up of #4239, and
fixes an issue pointed out in web-platform-tests/wpt#14637

A test for the new behavior was already merged to WPT.


/form-control-infrastructure.html ( diff )

This is a follow-up of whatwg#4239, and
fixes an issue pointed out in web-platform-tests/wpt#14637
@@ -56651,7 +56651,8 @@ fur
<li><p><span data-x="concept-event-fire">Fire an event</span> named
<code data-x="event-formdata">formdata</code> at <var>form</var> using
<code>FormDataEvent</code>, with the <code data-x="dom-FormDataEvent-formData">formData</code>
attribute initialized to <var>form data</var>.</p></li>
attribute initialized to <var>form data</var> and the
<code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to set boolean bubbles = true; in the IDL init dictionary instead. In Gecko, events are automatically generated, so I can’t implement this in the way specified here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's possible in WebIDL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, this is the standard pattern for firing events across the spec and web. You can't and shouldn't change the dictionary default, as that would affect user-created FormDataEvents.

I'm not sure how Gecko implements the hundreds of other cases in the spec which are worded this way, but it's worth looking in to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you are right: can’t override the underlying EventInit default. That’s alright, I’ll figure it out on the Gecko side.

@domenic domenic merged commit e8e2d90 into whatwg:master Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants