Change syntax
- Dominant language
- JavaScript
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The old syntax has quite a problem when used in site generator that still rely on XML parser 😭 (legacy of [polyglot markup](https://www.w3.org/TR/html-polyglot/) and [XHTML5](https://wikipedia.org/wiki/HTML5#XHTML_5_(XML-serialized_HTML_5)))
Here is the new syntax
```html
Count: 0
Magic
```
module.js
```js
/** @this HTMLElementButton */
export function magic() {
const text = new Text("")
this.onclick = () => text.value += this.textContent
this.append(text)
}
export default class {
accessor count = 0
increment() { this.count++ }
/** @type HTMLElementButton */ button
constructor() {
let count = 10
this.button.addEventListener("click", function() {
console.log(count--)
console.debug(this + "")
})
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.