@@ -13,27 +13,23 @@ function createTableFromJSON(arr) {
13
13
var tr = table . insertRow ( - 1 ) ;
14
14
15
15
var tabK = tr . insertCell ( 0 ) ;
16
- Object . assign ( tabK , {
17
- textContent : arr [ i ] . key ,
18
- style : "padding-right: 2rem;" ,
19
- id : "gl-ext-key-" + i ,
20
- "data-clipboard-target" : "#gl-ext-key-" + i ,
21
- title : "Copy name" ,
22
- "aria-live" : "polite" ,
23
- "data-placement" : "bottom" ,
24
- "data-toggle" : "tooltip"
25
- } ) ;
16
+ tabK . textContent = arr [ i ] . key ;
17
+ tabK . style = "padding-right: 2rem;" ;
18
+ tabK . title = "Copy name" ;
19
+ tabK . id = "gl-ext-key-" + i ;
20
+ tabK . setAttribute ( "data-clipboard-target" , "#gl-ext-key-" + i ) ;
21
+ tabK . setAttribute ( "aria-live" , "polite" ) ;
22
+ tabK . setAttribute ( "data-placement" , "bottom" ) ;
23
+ tabK . setAttribute ( "data-toggle" , "tooltip" ) ;
26
24
27
25
var tabV = tr . insertCell ( 1 ) ;
28
- Object . assign ( tabV , {
29
- textContent : arr [ i ] . value ,
30
- id : "gl-ext-val-" + i ,
31
- "data-clipboard-target" : "#gl-ext-val-" + i ,
32
- title : "Copy value" ,
33
- "aria-live" : "polite" ,
34
- "data-placement" : "bottom" ,
35
- "data-toggle" : "tooltip"
36
- } ) ;
26
+ tabV . textContent = arr [ i ] . value ;
27
+ tabV . title = "Copy value" ;
28
+ tabV . id = "gl-ext-val-" + i ;
29
+ tabV . setAttribute ( "data-clipboard-target" , "#gl-ext-val-" + i ) ;
30
+ tabV . setAttribute ( "aria-live" , "polite" ) ;
31
+ tabV . setAttribute ( "data-placement" , "bottom" ) ;
32
+ tabV . setAttribute ( "data-toggle" , "tooltip" ) ;
37
33
}
38
34
39
35
divForTheTable . appendChild ( table ) ;
0 commit comments