@garfish/utils
Advanced tools
Comparing version 1.13.5 to 1.13.6
@@ -305,3 +305,3 @@ // src/utils.ts | ||
} | ||
function setDocCurrentScript(target, code, define, url, async, originScript) { | ||
function setDocCurrentScript(target, code, define, url, async, defer, originScript) { | ||
if (!target) | ||
@@ -319,2 +319,5 @@ return noop; | ||
} | ||
if (defer) { | ||
el.setAttribute("defer", "true"); | ||
} | ||
const set = (val) => { | ||
@@ -321,0 +324,0 @@ try { |
@@ -37,3 +37,3 @@ import { interfaces } from '@garfish/core'; | ||
declare function findTarget(el: Element | ShadowRoot | Document, selectors: Array<string>): Document | Element | ShadowRoot; | ||
declare function setDocCurrentScript(target: any, code: string, define?: boolean, url?: string, async?: boolean, originScript?: HTMLScriptElement): () => void; | ||
declare function setDocCurrentScript(target: any, code: string, define?: boolean, url?: string, async?: boolean, defer?: boolean, originScript?: HTMLScriptElement): () => void; | ||
declare function _extends(d: any, b: any): void; | ||
@@ -40,0 +40,0 @@ declare function mapObject(obj: Record<PropertyKey, any>, fn: (key: PropertyKey, val: any) => any): {}; |
@@ -413,3 +413,3 @@ var __create = Object.create; | ||
} | ||
function setDocCurrentScript(target, code, define, url, async, originScript) { | ||
function setDocCurrentScript(target, code, define, url, async, defer, originScript) { | ||
if (!target) | ||
@@ -427,2 +427,5 @@ return noop; | ||
} | ||
if (defer) { | ||
el.setAttribute("defer", "true"); | ||
} | ||
const set = (val) => { | ||
@@ -429,0 +432,0 @@ try { |
{ | ||
"name": "@garfish/utils", | ||
"version": "1.13.5", | ||
"version": "1.13.6", | ||
"description": "utils module.", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@garfish/core": "1.13.5" | ||
"@garfish/core": "1.13.6" | ||
}, | ||
@@ -33,0 +33,0 @@ "publishConfig": { |
88201
2954