This bug Unable to get property 'ChildNodes' of undefined or null reference is specific for windows applications and browsers, and will happen whenever the user'action will select multiple lines of code outside of the available windows (eg. in playground), this will cause the app to crash because it won't store/save old lines of code (html). With window.onerror we will just print the error and preserve the app's status.
This bug
Unable to get property 'ChildNodes' of undefined or null reference
is specific for windows applications and browsers, and will happen whenever the user'action will select multiple lines of code outside of the available windows (eg. in playground), this will cause the app to crash because it won't store/save old lines of code (html). With window.onerror we will just print the error and preserve the app's status.