File tree 1 file changed +59
-0
lines changed
1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ <!-- <script type="text/javascript" src="../dist/index.umd.js"></script> -->
6
+ < script type ="text/javascript " src ="https://unpkg.com/@github/task-lists-element@latest "> </ script >
7
+ < title > task-lists-element demo</ title >
8
+ </ head >
9
+ < body >
10
+ < task-lists sortable >
11
+ < ul class ="contains-task-list ">
12
+ < li class ="task-list-item ">
13
+ < label >
14
+ < input type ="checkbox " class ="task-list-item-checkbox ">
15
+ Hubot
16
+ </ label >
17
+ </ li >
18
+ < li class ="task-list-item ">
19
+ < label >
20
+ < input type ="checkbox " class ="task-list-item-checkbox ">
21
+ Bender
22
+ </ label >
23
+ </ li >
24
+ </ ul >
25
+
26
+ < ul >
27
+ < li >
28
+ Nested
29
+
30
+ < ul class ="contains-task-list ">
31
+ < li class ="task-list-item ">
32
+ < label >
33
+ < input type ="checkbox " class ="task-list-item-checkbox ">
34
+ WALL-E
35
+ </ label >
36
+ </ li >
37
+ < li class ="task-list-item ">
38
+ < label >
39
+ < input type ="checkbox " class ="task-list-item-checkbox ">
40
+ BB-8
41
+ </ label >
42
+ </ li >
43
+ </ ul >
44
+ </ li >
45
+ </ ul >
46
+ </ task-lists >
47
+ < pre class ="events "> </ pre >
48
+ < script type ="text/javascript ">
49
+ const events = document . querySelector ( '.events' )
50
+ document . addEventListener ( 'task-lists:check' , function ( event ) {
51
+ events . append ( `task-lists:check - checked: ${ event . detail . checked } , position: ${ event . detail . position } \n` )
52
+ } )
53
+
54
+ document . addEventListener ( 'task-lists:move' , function ( event ) {
55
+ events . append ( `task-lists:move - from: ${ event . detail . src } , to: ${ event . detail . dst } \n` )
56
+ } )
57
+ </ script >
58
+ </ body >
59
+ </ html >
You can’t perform that action at this time.
0 commit comments