document.getElementById() not working

Issue #15224680 • Assigned to Steven K.

Details

Author
Tri P.
Created
Dec 26, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reports
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.

Attachments

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.

    Thanks,

    Steve

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

Sign in