Bug 50494 - Remove BeforeTextInsertedEvent
Summary: Remove BeforeTextInsertedEvent
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 15:17 PST by Ryosuke Niwa
Modified: 2023-12-19 14:56 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2010-12-03 15:17:39 PST
http://trac.webkit.org/changeset/13156 added BeforeTextInsertedEvent, which is used to implement maxlength in input element.
However, this event is also exposed to JavaScript.  In order to make editing code safer, it's beneficial to remove this event entirely or at least make it invisible from JavaScript.

This event is fired by ReplacementFragment and TypingCommand::insertText
Comment 1 Anne van Kesteren 2023-12-18 04:39:44 PST
It seems like this is not or no longer exposed to JavaScript. At least http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cscript%3E%0Aw(self.BeforeTextInsertedEvent)%0A%3C%2Fscript%3E logs undefined.
Comment 2 Ryosuke Niwa 2023-12-19 14:56:15 PST
We still fire this event in ReplacementFragment::ReplacementFragment.