document.getElementById() not working

Not reproducible Issue #15224680


Tri P.
Dec 26, 2017
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

  1. in the <head> add:
    <script id=’styles’></script>
    <script src=’myScript.js’></script>

  2. in myScript.js declare: document.getElementById(‘styles’);

Edge will report that no element is found with id 'styles’.
This works fine in Chrome & Firefox.


2 attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi,

    I am not able to repro this issue.  Will you provide the extended version of Windows 10 you are using?  Win  S and type “winver” and hit enter.

    I attached my repro html and js files.  Let me know if they work for you.  Also, you might have to “unblock” the files.  Right click and select “unblock” in the bottom right hand corner of the properties page.



  • Microsoft Edge Team

    Changed Status to “Not reproducible”

You need to sign in to your Microsoft account to add a comment.

Sign in