https://github.com/xiangjun9988/vscode-javascript-snippet-pack
${1:document}.addEventListener('${2:load}', function(e) {
${3:// body}
});
${1:document}.appendChild(${2:elem});
${1:document}.removeChild(${2:elem});
${1:document}.createElement(${2:elem});
${1:document}.createDocumentFragment();
${1:document}.classList.add('${2:class}');
${1:document}.classList.toggle('${2:class}');
${1:document}.classList.remove('${2:class}');
${1:document}.getElementById('${2:id}');
${1:document}.getElementsByClassName('${2:class}');
${1:document}.getElementsByTagName('${2:tag}');
${1:document}.getAttribute('${2:attr}');
${1:document}.setAttribute('${2:attr}', ${3:value});
${1:document}.removeAttribute('${2:attr}');
${1:document}.innerHTML = '${2:elem}';
${1:document}.textContent = '${2:content}';
${1:document}.querySelector('${2:selector}');
${1:document}.querySelectorAll('${2:selector}');
${1:array}.forEach(function(item) {
${2:// body}
});
function ${1:methodName} (${2:arguments}) {
${3:// body}
}
function(${1:arguments}) {
${2:// body}
}
${1:object}.prototype.${2:method} = function(${3:arguments}) {
${4:// body}
}
(function(${1:window}, ${2:document}) {
${3:// body}
})(${1:window}, ${2:document});
${1:method}.call(${2:context}, ${3:arguments})
${1:method}.apply(${2:context}, [${3:arguments}])
${1:functionName}: function(${2:arguments}) {
${3:// body}
}
JSON.parse(${1:obj});
JSON.stringify(${1:obj});
setInterval(function() {
${0:// body}
}, ${1:1000});
setTimeout(function() {
${0:// body}
}, ${1:1000});
alert('${1:msg}');