JavaScript/Limitations
Appearance
As of 2022, JavaScript has the following limitations:
- There appears to be no way to get a list of the active event listeners
- If no variable assigned to an interval (like
var example=setInterval(…)
), no interruption possible without closing or refreshing the page. - An endless loop (using
while
orfor
) can not be interrupted without closing or reloading the page. - No listing of active intervals or event listeners
- No removal of all event listeners from a specific element without affecting all sub-elements
- No direct removal of existing shadow DOMs (embedded documents with separate style sheets which are only necessary in rare circumstances) without affecting the parent element. A shadow DOM can only be removed by rewriting or changing the outer HTML, which removes all event listeners from the element and child elements.
- Constants (
const
) can not be deleted once created without closing or refreshing the page. Constants are meant to be unchangeable once specified, but they can not be removed as a whole. - The
prompt()
function can only generate binary choice dialogue boxes with "OK" and "Cancel" buttons, not "Yes" and "No". The latter dialogue boxes would have to be generated on the HTML interface itself, which takes far more effort than using the browser's built-in prompt dialogue.