-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix attributes handling within backtick, added syntax highlighter
- Loading branch information
shahrul
committed
Oct 17, 2024
1 parent
892b506
commit 1849ae9
Showing
11 changed files
with
154 additions
and
46 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
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
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 +1 @@ | ||
return <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head></head><body></body></html> | ||
return <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head></head><body></body></html> |
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,16 +1,16 @@ | ||
return <div> | ||
<script> | ||
class CounterElement extends HTMLElement { | ||
constructor() { | ||
super(); | ||
this.attachShadow({ mode: 'open' }); | ||
} | ||
<script> | ||
class CounterElement extends HTMLElement { | ||
constructor() { | ||
super(); | ||
this.attachShadow({ mode: 'open' }); | ||
} | ||
|
||
connectedCallback() { | ||
console.log(1) | ||
} | ||
connectedCallback() { | ||
console.log(1) | ||
} | ||
} | ||
|
||
customElements.define('counter-element', CounterElement); | ||
</script> | ||
customElements.define('counter-element', CounterElement); | ||
</script> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
local foo = { foo = "foo!" } | ||
return <!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="module" src="https://unpkg.com/@fluentui/web-components"></script> | ||
</head> | ||
<body> | ||
<counter-element></counter-element> | ||
<script> | ||
class CounterElement extends HTMLElement { | ||
constructor() { | ||
super(); | ||
this.attachShadow({ mode: 'open' }); | ||
this.count = 0; | ||
this.shadowRoot.innerHTML = ` | ||
<fluent-card> | ||
<p>Count: <span id="count">${this.count}</span></p> | ||
<fluent-button id="increment">Increment</fluent-button> | ||
<fluent-button id="decrement" _="foo">Decrement</fluent-button> | ||
</fluent-card> | ||
`; | ||
} | ||
|
||
connectedCallback() { | ||
this.shadowRoot.querySelector('#increment').addEventListener('click', () => this.increment()); | ||
this.shadowRoot.querySelector('#decrement').addEventListener('click', () => this.decrement()); | ||
} | ||
|
||
increment() { | ||
this.count++; | ||
this.updateCount(); | ||
} | ||
|
||
decrement() { | ||
this.count--; | ||
this.updateCount(); | ||
} | ||
|
||
updateCount() { | ||
this.shadowRoot.querySelector('#count').textContent = this.count; | ||
} | ||
} | ||
|
||
customElements.define('counter-element', CounterElement); | ||
</script> | ||
</body> | ||
</html> |
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 |
---|---|---|
|
@@ -108,4 +108,8 @@ local st = require('test.22_script_tag') | |
|
||
h(st) | ||
|
||
local st2 = require('test.23_web_component_test') | ||
|
||
h(st2) | ||
|
||
|
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