refactor(site): use const instead of class prop;
This commit is contained in:
parent
635337d973
commit
18263e1fee
2 changed files with 2 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
|||
class CodeBlockComponent extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.trimmed = this.innerHTML.trim();
|
||||
const trimmed = this.innerHTML.trim();
|
||||
const lang = this.getAttribute("language");
|
||||
|
||||
this.innerHTML = `
|
||||
<pre id="pre"><code id="code">${this.trimmed}</code></pre>
|
||||
<pre id="pre"><code id="code">${trimmed}</code></pre>
|
||||
`;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// @ts-check
|
||||
|
||||
/**
|
||||
* Custom element using a minimal Web Component Base class
|
||||
* @see https://ayco.io/n/web-component-base
|
||||
|
|
Loading…
Reference in a new issue