UNPKG

@playbooks/utils

Version:

A collection of utilities used for Playbooks.

10 lines (9 loc) 412 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const clearInput = (element) => { const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; nativeInputValueSetter.call(element, ""); const inputEvent = new Event("input", { bubbles: true }); element.dispatchEvent(inputEvent); }; exports.clearInput = clearInput;