|
| 1 | +{ |
| 2 | + "appendElement - full": { |
| 3 | + "scope": "javascript,typescript", |
| 4 | + "prefix": "appendElement", |
| 5 | + "body": [ |
| 6 | + "appendElement({", |
| 7 | + "\ttag: '${1:div}',", |
| 8 | + "\tid: '${2:id}',", |
| 9 | + "\tnamespace: '${3:html}',", |
| 10 | + "\tclassList: ['${4:class}'],", |
| 11 | + "\tstyles: {${5:style}: '$6'},", |
| 12 | + "\tproperties: {},", |
| 13 | + "\tattributes: {},", |
| 14 | + "\t[{ '${7:onload}', (e: Event) => $8, ${9:false} }],", |
| 15 | + "\tcheckExistanceParent: ${10:HTMLElement},", |
| 16 | + "\tignoreIfExists: ${11:true},", |
| 17 | + "\tskipIfExists: ${12:true},", |
| 18 | + "\tremoveIfExists: ${13:true},", |
| 19 | + "\tcustomCheck: (doc: Document, options: ElementOptions) => ${14:true},", |
| 20 | + "\tchildren: [$15]", |
| 21 | + "}, ${16:container});" |
| 22 | + ] |
| 23 | + }, |
| 24 | + "appendElement - minimum": { |
| 25 | + "scope": "javascript,typescript", |
| 26 | + "prefix": "appendElement", |
| 27 | + "body": "appendElement({ tag: '$1' }, $2);" |
| 28 | + }, |
| 29 | + "register Notifier": { |
| 30 | + "scope": "javascript,typescript", |
| 31 | + "prefix": "registerObserver", |
| 32 | + "body": [ |
| 33 | + "registerObserver({", |
| 34 | + "\t notify: (", |
| 35 | + "\t\tevent: _ZoteroTypes.Notifier.Event,", |
| 36 | + "\t\ttype: _ZoteroTypes.Notifier.Type,", |
| 37 | + "\t\tids: string[],", |
| 38 | + "\t\textraData: _ZoteroTypes.anyObj", |
| 39 | + "\t) => {", |
| 40 | + "\t\t$0", |
| 41 | + "\t}", |
| 42 | + "});" |
| 43 | + ] |
| 44 | + } |
| 45 | +} |
0 commit comments