st-tu-dresden / inloop

[Deprecated] A simple web application to manage online programming assignments
GNU General Public License v3.0
29 stars 8 forks source link

Add check for readyState of document #389

Closed julianctni closed 4 years ago

julianctni commented 4 years ago

Instead of only attaching a DOMContentLoaded event listener to document, the script now checks whether domReady state is not 'loading' anymore and then initializes the UI and JS logic. If the domReady state is still 'loading', the event listener is attached like before. This prevents the script from missing the event.

Fixes: #377