Add missing console API methods to JS snippets
This commit adds snippets for the following console API methods that were missing: - console.clear - console.dir - console.dirxml - console.groupCollapsed - console.info - console.profile - console.table I left out console.debug and console.exception since they are simply aliases for console.log and console.error. Information about the console API can be found at: https://developers.google.com/chrome-developer-tools/docs/console-api https://developer.mozilla.org/en-US/docs/Web/API/console
This commit is contained in:
parent
b9cdc97ef9
commit
bf0965fb6e
@ -83,6 +83,18 @@ snippet ca "console.assert"
|
|||||||
console.assert(${1:assertion}, ${2:"${3:message}"});
|
console.assert(${1:assertion}, ${2:"${3:message}"});
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet cclear "console.clear"
|
||||||
|
console.clear();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cdir "console.dir"
|
||||||
|
console.dir(${1:object});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cdirx "console.dirxml"
|
||||||
|
console.dirxml(${1:object});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet ce "console.error"
|
snippet ce "console.error"
|
||||||
console.error(${1:"${2:value}"});
|
console.error(${1:"${2:value}"});
|
||||||
endsnippet
|
endsnippet
|
||||||
@ -93,10 +105,30 @@ ${VISUAL}$0
|
|||||||
console.groupEnd();
|
console.groupEnd();
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet cgroupc "console.groupCollapsed"
|
||||||
|
console.groupCollapsed("${1:label}");
|
||||||
|
${VISUAL}$0
|
||||||
|
console.groupEnd();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ci "console.info"
|
||||||
|
console.info(${1:"${2:value}"});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet cl "console.log"
|
snippet cl "console.log"
|
||||||
console.log(${1:"${2:value}"});
|
console.log(${1:"${2:value}"});
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
snippet cprof "console.profile"
|
||||||
|
console.profile("${1:label}");
|
||||||
|
${VISUAL}$0
|
||||||
|
console.profileEnd();
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ctable "console.table"
|
||||||
|
console.table(${1:"${2:value}"});
|
||||||
|
endsnippet
|
||||||
|
|
||||||
snippet ctime "console.time"
|
snippet ctime "console.time"
|
||||||
console.time("${1:label}");
|
console.time("${1:label}");
|
||||||
${VISUAL}$0
|
${VISUAL}$0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user