You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Inform Extension.js that the shadow root is available.
25
-
window.__EXTENSION_SHADOW_ROOT__=shadowRoot
26
-
27
-
shadowRoot.innerHTML=`
28
-
<div class="content_script">
29
-
<img class="content_logo" src="${logo}" />
30
-
<h1 class="content_title">
31
-
Welcome to your Sass Extension
32
-
</h1>
33
-
<p class="content_description">
34
-
Learn more about creating cross-browser extensions at <a
35
-
className="underline hover:no-underline"
36
-
href="https://extension.js.org"
37
-
target="_blank"
38
-
>
39
-
https://extension.js.org
40
-
</a>
41
-
</p>
42
-
</div>
43
-
`
27
+
conststyle=document.createElement('style')
28
+
shadowRoot.appendChild(style)
29
+
30
+
// Create content container div
31
+
constcontentDiv=document.createElement('div')
32
+
contentDiv.className='content_script'
33
+
shadowRoot.appendChild(contentDiv)
34
+
35
+
// Create logo image
36
+
constlogoImg=document.createElement('img')
37
+
logoImg.className='content_logo'
38
+
logoImg.src=logo
39
+
contentDiv.appendChild(logoImg)
40
+
41
+
// Create title
42
+
consttitle=document.createElement('h1')
43
+
title.className='content_title'
44
+
title.textContent='Welcome to your Sass Extension'
45
+
contentDiv.appendChild(title)
46
+
47
+
// Create description
48
+
constdescription=document.createElement('p')
49
+
description.className='content_description'
50
+
description.innerHTML=
51
+
'Learn more about creating cross-browser extensions at <a class="underline hover:no-underline" href="https://extension.js.org" target="_blank">https://extension.js.org</a>'
0 commit comments