File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,25 @@ export default class TaskListsElement extends HTMLElement {
74
74
}
75
75
76
76
const handleTemplate = document . createElement ( 'template' )
77
- const span = handleTemplate . content . appendChild ( document . createElement ( 'span' ) )
77
+ const span = document . createElement ( 'span' )
78
78
span . classList . add ( 'handle' )
79
- const svg = span . appendChild ( document . createElement ( 'svg' ) )
79
+
80
+ const svg = document . createElementNS ( 'http://www.w3.org/2000/svg' , 'svg' )
80
81
svg . classList . add ( 'drag-handle' )
81
82
svg . setAttribute ( 'aria-hidden' , 'true' )
82
83
svg . setAttribute ( 'width' , '16' )
83
84
svg . setAttribute ( 'height' , '16' )
84
- const path = svg . appendChild ( document . createElement ( 'path' ) )
85
+
86
+ const path = document . createElementNS ( 'http://www.w3.org/2000/svg' , 'path' )
85
87
path . setAttribute (
86
88
'd' ,
87
89
'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
90
)
89
91
92
+ handleTemplate . content . appendChild ( span )
93
+ span . appendChild ( svg )
94
+ svg . appendChild ( path )
95
+
90
96
const initialized = new WeakMap ( )
91
97
92
98
// Only top-level lists are draggable, and nested lists drag with their parent item.
You can’t perform that action at this time.
0 commit comments