The global <a data-l10n-name="mdn-beforeinput">beforeinput</a> event is fired on an <a data-l10n-name="mdn-input">&lt;input&gt;</a> and <a data-l10n-name="mdn-textarea">&lt;textarea&gt;</a> elements, or any element whose <a data-l10n-name="mdn-contenteditable">contenteditable</a> attribute is enabled, immediately before the element’s value changes. The event allows web apps to override the browser’s default behavior for user interaction, e.g., web apps can cancel user input only for specific characters or can modify pasting styled text only with approved styles.
Globalne tšojenje <a data-l10n-name="mdn-beforeinput">beforeinput</a> se na elementach <a data-l10n-name="mdn-input">&lt;input&gt;</a> a na elementach <a data-l10n-name="mdn-textarea">&lt;textarea&gt;</a> abo na kuždem elemenśe, kótaregož atribut <a data-l10n-name="mdn-contenteditable">contenteditable</a> jo zaktiwěrowany, njepósrědnje pśed změnu gódnoty elementa wuwołajo. Tšojenje webnałoženjam zmóžnja, standardne zaźaržanje wobglědowaka za wužywaŕsku interakciju pśepisaś, na pś. webnałoženja mógu wužywaŕske zapódaśe jano za wěste znamuška pśetergniś abo zasajźenje teksta ze stilami jano ze pśizwólonymi stilami změniś.