This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use HTMLInputElement for text input | |
const nativeTextAreaValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set | |
nativeTextAreaValueSetter.call(inputRef, newTextareaValue) | |
const inputEvent = new Event('input', { bubbles: true }) | |
inputRef.dispatchEvent(inputEvent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include jQuery for this script to work | |
// or | |
// replace with vannila javascript where needed | |
var d = document.documentElement, b = document.body; | |
var scrollTop = d.scrollTop || b.scrollTop; | |
var scrollHeight = d.scrollHeight || b.scrollHeight; | |
var h = document.documentElement, | |
b = document.body, |