domql 1.5.65 → 1.5.66
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.
- package/package.json +1 -1
- package/src/element/create.js +20 -3
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "DOM rendering Javascript framework at early stage.",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "symbo.ls",
|
|
6
|
-
"version": "1.5.
|
|
6
|
+
"version": "1.5.66",
|
|
7
7
|
"repository": "https://github.com/domql/domql",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"registry": "https://registry.npmjs.org"
|
package/src/element/create.js
CHANGED
|
@@ -11,8 +11,8 @@ import createProps from './props'
|
|
|
11
11
|
import update from './update'
|
|
12
12
|
import { on } from '../event'
|
|
13
13
|
import { assignClass } from './mixins/classList'
|
|
14
|
-
import { isFunction, isNumber, isString, createID, isNode, exec } from '../utils'
|
|
15
|
-
import { remove, lookup, setProps, log, keys, parse, parseDeep, spotByPath, nextElement, previousElement } from './methods'
|
|
14
|
+
import { isObject, isFunction, isNumber, isString, createID, isNode, exec } from '../utils'
|
|
15
|
+
import { remove, lookup, setProps, log, keys, parse, parseDeep, spotByPath, nextElement, previousElement, isMethod } from './methods'
|
|
16
16
|
import cacheNode from './cache'
|
|
17
17
|
import { registry } from './mixins'
|
|
18
18
|
import OPTIONS from './options'
|
|
@@ -112,7 +112,24 @@ const create = (element, parent, key, options = OPTIONS.create || {}) => {
|
|
|
112
112
|
// Only resolve extends, skip everything else
|
|
113
113
|
if (options.onlyResolveExtends) {
|
|
114
114
|
applyExtend(element, parent, options)
|
|
115
|
-
|
|
115
|
+
//if (!element.__attr) element.__attr = {}
|
|
116
|
+
|
|
117
|
+
for (const param in element) {
|
|
118
|
+
const prop = element[param]
|
|
119
|
+
if (isMethod(param) || isObject(registry[param]) || prop === undefined) continue
|
|
120
|
+
|
|
121
|
+
const hasDefined = element.define && element.define[param]
|
|
122
|
+
const ourParam = registry[param]
|
|
123
|
+
const hasOptionsDefine = options.define && options.define[param]
|
|
124
|
+
if (ourParam && !hasOptionsDefine) {
|
|
125
|
+
continue
|
|
126
|
+
} else if (element[param] && !hasDefined && !hasOptionsDefine) {
|
|
127
|
+
create(exec(prop, element), element, param, options)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//createNode(element, options)
|
|
132
|
+
return element;
|
|
116
133
|
}
|
|
117
134
|
|
|
118
135
|
// assign context
|