Maybe I'm missing something here, but window.setAttribute(...) throws an error.
I'm using window.setCursor('wait') and window.setCursor('auto') for get this effect.
We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS