-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
(function(doc){ | ||
var scriptElm = doc.scripts[doc.scripts.length - 1]; | ||
var warn = ['[calcite] Deprecated script, please remove: ' + scriptElm.outerHTML]; | ||
|
||
warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:') | ||
|
||
var parts = scriptElm.src.split('/'); | ||
parts.pop(); | ||
parts.push('calcite'); | ||
var url = parts.join('/'); | ||
|
||
var scriptElm = doc.createElement('script'); | ||
scriptElm.setAttribute('type', 'module'); | ||
scriptElm.src = url + '/calcite.esm.js'; | ||
warn.push(scriptElm.outerHTML); | ||
scriptElm.setAttribute('data-stencil-namespace', 'calcite'); | ||
doc.head.appendChild(scriptElm); | ||
|
||
scriptElm = doc.createElement('script'); | ||
scriptElm.setAttribute('nomodule', ''); | ||
scriptElm.src = url + '/calcite.js'; | ||
warn.push(scriptElm.outerHTML); | ||
scriptElm.setAttribute('data-stencil-namespace', 'calcite'); | ||
doc.head.appendChild(scriptElm); | ||
|
||
console.warn(warn.join('\n')); | ||
|
||
})(document); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.