Problem/Motivation
All JavaScript breaks if an HTML id="module" is in the markup.
This issue was stumbled across in Drupal.
The issue for it is located at: https://www.drupal.org/project/drupal/issues/2961308
I have tested it in IE 11, Edge, and Chrome.
I believe it might be in issue in drupal because domready is loaded with the rest of the javascript at the bottom of the document.
Here is the amended test that fails.
<!DOCTYPE HTML>
<html lang="en-us">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title id="module">domReady test</title>
<script src="../src/ready.js"></script>
<script type="text/javascript">
domready(function () {
document.getElementById('title').innerHTML = 'domready'
domready(function () {
document.getElementById('title').innerHTML += '✓'
})
})
</script>
</head>
<body>
<h1 id="title"></h1>
</body>
</html>
Problem/Motivation
All JavaScript breaks if an HTML id="module" is in the markup.
This issue was stumbled across in Drupal.
The issue for it is located at: https://www.drupal.org/project/drupal/issues/2961308
I have tested it in IE 11, Edge, and Chrome.
I believe it might be in issue in drupal because domready is loaded with the rest of the javascript at the bottom of the document.
Here is the amended test that fails.