Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99c72d4

Browse files
authored
Merge pull request#35 from github/pse-paved-paths/trusted-types-compatibility
Make task-lists-elements CSP Trusted Types compatible
2 parents70675e8 +98a446c commit99c72d4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎src/task-lists-element.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ export default class TaskListsElement extends HTMLElement {
7474
}
7575

7676
consthandleTemplate=document.createElement('template')
77-
handleTemplate.innerHTML=`
78-
<span class="handle">
79-
<svg class="drag-handle" aria-hidden="true" width="16" height="16">
80-
<path d="M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z"/>
81-
</svg>
82-
</span>`
77+
constspan=handleTemplate.content.appendChild(document.createElement('span'))
78+
span.classList.add('handle')
79+
constsvg=span.appendChild(document.createElement('svg'))
80+
svg.classList.add('drag-handle')
81+
svg.setAttribute('aria-hidden','true')
82+
svg.setAttribute('width','16')
83+
svg.setAttribute('height','16')
84+
constpath=svg.appendChild(document.createElement('path'))
85+
path.setAttribute(
86+
'd',
87+
'M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z'
88+
)
8389

8490
constinitialized=newWeakMap()
8591

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp