now we can add attributes to js files using the tools class
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
//function PLGNTLS_fetch(url, options = {}) {
|
||||
/**
|
||||
* this file is there for scripts that uses modules import
|
||||
*/
|
||||
export function PLGNTLS_fetch(url, options = {}) {
|
||||
console.log("inside PLGNTLS_fetch");
|
||||
url = PLGNTLS_data.fetch_url + url;
|
||||
@@ -11,3 +13,10 @@ export function PLGNTLS_fetch(url, options = {}) {
|
||||
return fetch(url, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* For non-module scripts, attach to the global scope
|
||||
*/
|
||||
if (typeof window !== 'undefined') {
|
||||
window.PLGNTLS_fetch = PLGNTLS_fetch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user