# Summary
Added SubmitEvent support (constructor, submitter attribute) and wired form submit events to produce SubmitEvent instances.
Implemented SubmitEvent DOM class, WebIDL, and build hooks.
Added a test file (logs to console).
# Notes
Form submissions already carry the originating control in `InternalFormEvent::mOriginator`, so `SubmitEvent.submitter` can be populated directly from the existing event data without invasive changes to form submission logic.
`EventDispatcher` now returns `SubmitEvent` specifically for `eFormSubmit`, keeping other form events (e.g., reset) unchanged.
`event.submitter` is set for user-initiated submits via the originating submit control.
`new SubmitEvent("submit", { submitter })` returns the provided submitter (or `null` if omitted).
# Ways to test
Go to repo.palemoon.org. You will no longer see the message `This browser doesn't have "SubmitEvent" support, use a tricky method to polyfill` in the console. The site will work as expected without loading this polyfill anymore.
Go to GitHub. You will now be able to mark notifications as read.
Open the test file submitted in this PR. You will see the results of the test in the browser console.
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2919
Co-authored-by: Basilisk-Dev <basiliskdev@protonmail.com>
Co-committed-by: Basilisk-Dev <basiliskdev@protonmail.com>
* RE: BasicEvents.h - our WidgetEvent is not movable (yet), so the change that requires that wasn't included.
* Parts of this use code that was introduced in bug 1427511. For now, they were replaced with their equivalents.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
* Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent
* Add nsIDOMEventTarget::PreHandleEvent
* Add EventTargetChainItem::GetFirstEventTarget
* Call EventTargetChainItem::PreHandleEvent even it sets mCanHandle=false
* Move form control frame focus/blur from nsGenericHTMLFormElement::GetEventTargetParent to PreHandleEvent
* Move fire change event from HTMLTextAreaElement::GetEventTargetParent to PreHandleEvent
* Refine nsXULElement::GetEventTargetParent
* Move dispatch XUL command from nsXULElement::GetEventTargetParent to PreHandleEvent
* Move fire events and set value from HTMLInputElement::GetEventTargetParent to PreHandleEvent
* Add test case
* Let HTMLInputElement delegate event handling to it's parent class
* Refine EventTargetChain flags to reduce overheads
* Refine event target chain creation
* Refine assertion in EventTargetChainItem::Create
Tag #1375
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.