Access to script at 'file:///Users/philip/Projects/test.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
// Convert a groovy map to json object Map user = [name:'zdd', age:18, info: [address:'beijing', phone:'123456789']]; println JsonOutput.toJson(user)
// Convert a json object to groovy map def jsonString = '{"name": "John", "age": 30, "city": "New York"}' def jsonSlurper = new JsonSlurper() def jsonObject = jsonSlurper.parseText(JsonOutput.toJson(user)) println jsonObject
// Given a string "feat(configuration): id-xxxx add configuration for user page", please extract the jira id: id-xxx // can you do it with regex? the target string start with ": " and end with " ", return null if not found def str = "feat(configuration): id-xxxx add configuration for user page" def jiraId2 = str =~ /: (.*?) / println jiraId2[0][1]
window.DomContentLoaded - Html文件解析和加载完成(parsed and loaded),且所有标记为defer的js脚本全部下载并执行完成后触发,注意,该事件不会等待其他资源,比如images,subframes,或者标记为async的script下载完成。另外,该事件不会等待stylesheet完成,但是:因为defer脚本会等待stylesheet加载完才执行,而该事件又在defer脚本执行完才触发,所以如果有defer脚本存在的话,那么该事件一定会等待stylesheet加载完才触发。
Posted onEdited onInnode.js Symbols count in article: 128Reading time ≈1 mins.
Famous NPM Packages
cross-env
cross-env is a cross platform solution to setting and using environment variables. It’s available as a command line utility as well as a Node.js module.