<template> tag content not returning firstElementChild

Confirmed Issue #11342645 • Assigned to Fei W.

Details

Author
Noel A.
Created
Mar 21, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
38.14393
Reports
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

The following should alert “foo” but alerts undefined instead:

var tempElement = window.document.createElement('template');
tempElement.innerHTML = "<div id='foo'></div>";

var child = tempElement.content.firstElementChild;

alert(child &amp;&amp; child.id);

Works correctly in Chrome and Firefox

Fiddle: https://jsfiddle.net/5gt8wzm0/1/

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Jeff W.”

      Changed Status to “Confirmed”

      Changed Title from “Edge 38 <template> tag content not returning firstElementChild” to “<template> tag content not returning firstElementChild”

      Changed Title from “<template> tag content not returning firstElementChild” to “<template> tag content not returning firstElementChild”

      Changed Assigned To from “Jeff W.” to “Arron E.”

      Changed Assigned To from “Arron E.” to “Kris K.”

      Changed Assigned To from “Kris K.” to “Fei W.”

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

    Sign in