summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/test/doc_inspector_highlighter_custom_element.xhtml
blob: 83d6bc173566ce1e8cd46b1e3bdabd4c60b83ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Test that the picker works correctly with custom element anonymous nodes</title>
</head>
<body>
<template id="template"><div class="custom-element-anon">Anonymous</div></template>
<custom-element id="custom-element" style="background:red; display: block;"/>
<script>
  "use strict";
  customElements.define("custom-element", class extends HTMLElement {
    constructor() {
      super();
      const template = document.getElementById("template");
      this.attachShadow({mode: "open"})
        .appendChild(template.content.cloneNode(true));
    }
  });
</script>
</body>
</html>