Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All JavaScript breaks if an HTML id="module" is in the markup #57

Open
elachlan opened this issue Apr 26, 2018 · 0 comments
Open

All JavaScript breaks if an HTML id="module" is in the markup #57

elachlan opened this issue Apr 26, 2018 · 0 comments

Comments

@elachlan
Copy link
Contributor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant