-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Magic comments? Who needs them! I'm going to lean hard into html and write some server-side custom elements. Here goes nothing. Write some tests. Make them pass.
- Loading branch information
Showing
4 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
/* @format */ | ||
|
||
console.log("Hello World!"); | ||
|
||
class IncludeHere extends HTMLElement { | ||
connectedCallback() { | ||
console.error("Unexpected Custom element added to page!"); | ||
console.error(this); | ||
this.parentElement.removeChild(this); | ||
} | ||
} | ||
|
||
class IncludeInHeader extends IncludeHere {} | ||
|
||
customElements.define("include-in-header", IncludeInHeader); | ||
customElements.define("eval-ruby", IncludeHere); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters