Skip to content

Commit

Permalink
Remove custom element JS
Browse files Browse the repository at this point in the history
If `<eval-ruby>` isn't working in the build, there's no mechanism to
actually compose the page and load script.js...so it's clever, but not
practically useful.
  • Loading branch information
danott committed Jan 15, 2024
1 parent 70298e9 commit 7817567
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions site/javascripts/script.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
/* @format */

console.log("Hello World!");

class EvalRuby extends HTMLElement {
connectedCallback() {
console.error(
"Unexpected element added to page! This should have been removed when building the site!"
);
console.error(this);
this.parentElement.removeChild(this);
}
}

class IncludeInHeader extends EvalRuby {}

customElements.define("eval-ruby", EvalRuby);
customElements.define("include-in-header", IncludeInHeader);

0 comments on commit 7817567

Please sign in to comment.