From 682cc57040a3a57c99328f2c954df7e4e32f2cc2 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 23 Sep 2022 18:46:13 +0100 Subject: [PATCH 1/2] move AOR to primer --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index e6bf555..68f394d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @github/web-systems-reviewers +* @github/primer-reviewers From 98a446ce2a5843e778bd21865cd4c4bb3c3af87f Mon Sep 17 00:00:00 2001 From: Kylie Stradley <4666485+KyFaSt@users.noreply.github.com> Date: Wed, 21 Dec 2022 14:04:05 +0000 Subject: [PATCH 2/2] make task-lists-elements trusted types compatible * this change doesn't actually add any security to task-lists-elements, it effectively just adheres to the trusted types API by not passing bare strings directly to --- src/task-lists-element.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/task-lists-element.ts b/src/task-lists-element.ts index 50978c3..db484d8 100644 --- a/src/task-lists-element.ts +++ b/src/task-lists-element.ts @@ -74,12 +74,18 @@ export default class TaskListsElement extends HTMLElement { } const handleTemplate = document.createElement('template') -handleTemplate.innerHTML = ` - - - ` +const span = handleTemplate.content.appendChild(document.createElement('span')) +span.classList.add('handle') +const svg = span.appendChild(document.createElement('svg')) +svg.classList.add('drag-handle') +svg.setAttribute('aria-hidden', 'true') +svg.setAttribute('width', '16') +svg.setAttribute('height', '16') +const path = svg.appendChild(document.createElement('path')) +path.setAttribute( + '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' +) const initialized = new WeakMap()