Closed KnIfER closed 2 years ago
I've got the same question. @be5invis do you have any JS code examples on how to use the extension?
I was able to stop the execution like this:
setInterval(() => {
document_body_innerHTML = document.body.innerHTML
debugger
}, 10*1000)
You need to call setInterval
or setTimeout
because otherwise the custom JS executes too quick, before majority of VS Code loaded.
Now from here, I'd like to execute a command on Editor blur. I can get currently focused editor like this:
[...document.querySelectorAll('.editor .editor-container .editor-instance textarea[aria-roledescription="editor"]')].find(el => el === document.activeElement)
Then I can add listener for "blur" like this:
editorEl.addEventListener('blur', (e) => console.log('lost focus ', e))
The only thing I'm missing is calling the VS Code command that I want.
Any ideas?
Thank you! 🙏
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.