6 examples of 'get href javascript' in JavaScript

Every line of 'get href javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
4get href() {
5 return this.node.source.value;
6}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

64function _getLoadUrl(code) {
65 return this.contextPath + 'workflow/flow/define/viewxml/'+ code +'/000';
66}
20export function getLinkUrl(value: Resource | ResourceLinks, ...rels: ReadonlyArray<string>) {
21 if (!value) {
22 return false;
23 }
24
25 const links = value._links || value;
26
27 for (const rel of rels) {
28 const link = links[rel];
29
30 if (link && link.method && link.href) {
31 return link.href;
32 }
33 }
34
35 return undefined;
36}
111function getScriptUrl(script) {
112 var url = script.src;
113 if (url) {
114 // Normalize package: urls
115 var index = url.indexOf('packages/');
116 if (index == 0 || (index > 0 && url[index - 1] == '/')) {
117 url = "package:" + url.slice(index + 9);
118 }
119 return url;
120 } else {
121 // TODO(sigmund): investigate how to eliminate the warning in Dartium
122 // (changing to text/javascript hides the warning, but seems wrong).
123 return "data:application/dart;base64," + window.btoa(script.textContent);
124 }
125}
64function getJsCode(url) {
65 return unescape(url.substr(11));
66}
305function generateScriptDataUrl(script) {
306 var scriptContent = generateScriptContent(script);
307 return 'data:text/javascript;charset=utf-8,' + encodeURIComponent(scriptContent);
308}

Related snippets