@tarojs/runtime 4.0.0-beta.120 → 4.0.0-beta.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { PLATFORM_TYPE } from '@tarojs/shared';
|
|
1
2
|
import { TaroElement } from '../dom/element.js';
|
|
2
3
|
import { TaroNode } from '../dom/node.js';
|
|
3
4
|
import { setInnerHTML } from './inner-html/html.js';
|
|
4
5
|
import { getBoundingClientRectImpl, getTemplateContent } from './element.js';
|
|
5
6
|
import { insertAdjacentHTML, cloneNode, contains } from './node.js';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
const isHarmony = process.env.TARO_PLATFORM === 'harmony' || process.env.TARO_ENV === 'harmony';
|
|
9
|
-
if (!isWeb && !isHarmony) {
|
|
8
|
+
if (process.env.TARO_PLATFORM !== PLATFORM_TYPE.WEB && process.env.TARO_PLATFORM !== PLATFORM_TYPE.HARMONY) {
|
|
10
9
|
if (ENABLE_INNER_HTML) {
|
|
11
10
|
TaroNode.extend('innerHTML', {
|
|
12
11
|
set(html) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/dom-external/index.ts"],"sourcesContent":["import { TaroElement } from '../dom/element'\nimport { TaroNode } from '../dom/node'\nimport { setInnerHTML } from '../dom-external/inner-html/html'\nimport { getBoundingClientRectImpl, getTemplateContent } from './element'\nimport { cloneNode, contains, insertAdjacentHTML } from './node'\n\ndeclare const ENABLE_INNER_HTML: boolean\ndeclare const ENABLE_ADJACENT_HTML: boolean\ndeclare const ENABLE_CLONE_NODE: boolean\ndeclare const ENABLE_CONTAINS: boolean\n\ndeclare const ENABLE_SIZE_APIS: boolean\ndeclare const ENABLE_TEMPLATE_CONTENT: boolean\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/dom-external/index.ts"],"sourcesContent":["import { PLATFORM_TYPE } from '@tarojs/shared'\n\nimport { TaroElement } from '../dom/element'\nimport { TaroNode } from '../dom/node'\nimport { setInnerHTML } from '../dom-external/inner-html/html'\nimport { getBoundingClientRectImpl, getTemplateContent } from './element'\nimport { cloneNode, contains, insertAdjacentHTML } from './node'\n\ndeclare const ENABLE_INNER_HTML: boolean\ndeclare const ENABLE_ADJACENT_HTML: boolean\ndeclare const ENABLE_CLONE_NODE: boolean\ndeclare const ENABLE_CONTAINS: boolean\n\ndeclare const ENABLE_SIZE_APIS: boolean\ndeclare const ENABLE_TEMPLATE_CONTENT: boolean\n\nif (process.env.TARO_PLATFORM !== PLATFORM_TYPE.WEB && process.env.TARO_PLATFORM !== PLATFORM_TYPE.HARMONY) {\n if (ENABLE_INNER_HTML) {\n TaroNode.extend('innerHTML', {\n set (html: string) {\n setInnerHTML.call(this, this, html)\n },\n get (): string {\n return ''\n }\n })\n\n if (ENABLE_ADJACENT_HTML) {\n TaroNode.extend('insertAdjacentHTML', insertAdjacentHTML)\n }\n }\n\n if (ENABLE_CLONE_NODE) {\n TaroNode.extend('cloneNode', cloneNode)\n }\n\n if (ENABLE_CONTAINS) {\n TaroNode.extend('contains', contains)\n }\n\n if (ENABLE_SIZE_APIS) {\n TaroElement.extend('getBoundingClientRect', getBoundingClientRectImpl)\n }\n\n if (ENABLE_TEMPLATE_CONTENT) {\n TaroElement.extend('content', {\n get () {\n return getTemplateContent(this)\n }\n })\n }\n}\n"],"names":[],"mappings":";;;;;;;AAgBA,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,aAAa,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,aAAa,CAAC,OAAO,EAAE;IAC1G,IAAI,iBAAiB,EAAE;AACrB,QAAA,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;AAC3B,YAAA,GAAG,CAAE,IAAY,EAAA;gBACf,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;aACpC;YACD,GAAG,GAAA;AACD,gBAAA,OAAO,EAAE,CAAA;aACV;AACF,SAAA,CAAC,CAAA;QAEF,IAAI,oBAAoB,EAAE;AACxB,YAAA,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAA;SAC1D;KACF;IAED,IAAI,iBAAiB,EAAE;AACrB,QAAA,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;KACxC;IAED,IAAI,eAAe,EAAE;AACnB,QAAA,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;KACtC;IAED,IAAI,gBAAgB,EAAE;AACpB,QAAA,WAAW,CAAC,MAAM,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAA;KACvE;IAED,IAAI,uBAAuB,EAAE;AAC3B,QAAA,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE;YAC5B,GAAG,GAAA;AACD,gBAAA,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAA;aAChC;AACF,SAAA,CAAC,CAAA;KACH;AACH"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -3310,9 +3310,7 @@ function contains(node) {
|
|
|
3310
3310
|
return isContains;
|
|
3311
3311
|
}
|
|
3312
3312
|
|
|
3313
|
-
|
|
3314
|
-
const isHarmony = process.env.TARO_PLATFORM === 'harmony' || process.env.TARO_ENV === 'harmony';
|
|
3315
|
-
if (!isWeb && !isHarmony) {
|
|
3313
|
+
if (process.env.TARO_PLATFORM !== shared.PLATFORM_TYPE.WEB && process.env.TARO_PLATFORM !== shared.PLATFORM_TYPE.HARMONY) {
|
|
3316
3314
|
if (ENABLE_INNER_HTML) {
|
|
3317
3315
|
TaroNode.extend('innerHTML', {
|
|
3318
3316
|
set(html) {
|