(element, selector)
| 159 | function keyUp(e){let n=document.createEvent("KeyboardEvent");Object.defineProperty(n,"keyCode",{get:function(){return this.keyCodeVal}}),n.initKeyboardEvent?n.initKeyboardEvent("keyup",!0,!0,document.defaultView,e,e,"","",!1,""):n.initKeyEvent("keyup",!0,!0,document.defaultView,!1,!1,!1,!1,e,0),n.keyCodeVal=e,document.body.dispatchEvent(n)} |
| 160 | |
| 161 | function closest(element, selector) { |
| 162 | let el = element; |
| 163 | while (el !== null) { |
| 164 | if (el.matches(selector)) return el; |
| 165 | |
| 166 | let found = el.querySelector(selector); |
| 167 | if (found) return found; |
| 168 | |
| 169 | el = el.parentElement; |
| 170 | } |
| 171 | return el; |
| 172 | } |
| 173 | // TODO: finish this |
| 174 | function notifyStack(msg) { |
| 175 | let id = "ufs_notify_stack"; |
no outgoing calls
no test coverage detected