Skip to content

Commit

Permalink
Update the demo to use non-deprecated APIs.
Browse files Browse the repository at this point in the history
1) Replace `document.registerElement` with `customElements.define`.
2) Replace `createShadowRoot` with `attachShadow`.
3) Get rid of `document.writeln`, which is unsupported and unneeded.

Up-to-date as of Oct 23, 2022.
  • Loading branch information
jenna-h committed Oct 23, 2022
1 parent 50dbde7 commit 9c32ccd
Show file tree
Hide file tree
Showing 2 changed files with 570 additions and 573 deletions.
5 changes: 0 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<title>HTML5 &lt;x-knob&gt; rotating knob web component</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--
Required for browsers that do not yet support the latest technologies.
http://webcomponents.org/
https://github.com/webcomponents/webcomponentsjs/releases
-->
<script type="text/javascript">
if (!document.registerElement) {
document.writeln(decodeURI('%3Cscript%20src=%22https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.12/webcomponents.min.js%22%20type=%22text/javascript%22%3E%3C/script%3E'));
Expand Down
Loading

0 comments on commit 9c32ccd

Please sign in to comment.