Comparing version 0.7.15 to 0.7.17
@@ -26,2 +26,4 @@ ( function( global, factory ) { | ||
var utils = require('./utils'); | ||
// - parentNodes 父节点 (HTMLNode) | ||
@@ -1323,10 +1325,27 @@ // - name 子节点selector. | ||
CreateDom.extend = function(plugin) { | ||
if (plugin) { | ||
for (const key in plugin) { | ||
if (arguments.length == 0) | ||
return {} | ||
if (arguments.length == 1) { | ||
for (const key in arguments[0]) { | ||
if (key == 'extend' || key == 'fn') continue; | ||
if (typeof plugin[key] === 'function') { | ||
CreateDom[key] = plugin[key]; | ||
if (typeof arguments[0][key] === 'function') { | ||
CreateDom[key] = arguments[0][key]; | ||
} | ||
} | ||
return this; | ||
} | ||
else { | ||
if (arguments[0] === false ) | ||
throw new Error('can\'t be false'); | ||
var o = {}; | ||
var i = 0; | ||
if (arguments[0] === true ) | ||
i = 1; | ||
for (; i < arguments.length; i++) { | ||
o = utils.mergeMap(o, arguments[i]); | ||
} | ||
return o; | ||
} // if..else. | ||
} | ||
@@ -1333,0 +1352,0 @@ |
@@ -84,3 +84,3 @@ { | ||
"name": "febs", | ||
"version": "0.7.15" | ||
"version": "0.7.17" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1674224
17004