Comparing version 0.8.35 to 0.8.36
@@ -1486,3 +1486,15 @@ | ||
/** | ||
* @desc: 判断是否是dom对象. | ||
* @return: boolean. | ||
*/ | ||
Dom.isDom = function(e) { | ||
return (typeof HTMLElement === 'object') ? ( | ||
e instanceof HTMLElement | ||
) : ( | ||
e && typeof e === 'object' && e.nodeType === 1 && typeof e.nodeName === 'string' | ||
); | ||
} | ||
exports.Dom = Dom; | ||
exports.CreateDom = CreateDom; |
@@ -127,2 +127,7 @@ febs 库是一些常用的工具的合集; | ||
febs.dom.getElementOffset(e:any):{left:number, top:number}; | ||
/** | ||
* @desc: 判断是否是dom对象. | ||
* @return: boolean. | ||
*/ | ||
febs.dom.isDom(e: any): boolean; | ||
``` | ||
@@ -129,0 +134,0 @@ |
@@ -616,2 +616,8 @@ // Type definitions for febs | ||
function getElementOffset(e: any): { left: number, top: number }; | ||
/** | ||
* @desc: 判断是否是dom对象. | ||
* @return: boolean. | ||
*/ | ||
function isDom(e: any): boolean; | ||
} | ||
@@ -618,0 +624,0 @@ |
@@ -100,2 +100,6 @@ | ||
================== | ||
- [feature] add febs.date.xxx. | ||
- [feature] add febs.date.xxx. | ||
0.8.36 | ||
================== | ||
- [feature] add dom.isDom |
@@ -86,3 +86,3 @@ { | ||
"name": "febs", | ||
"version": "0.8.35" | ||
"version": "0.8.36" | ||
} |
@@ -74,2 +74,3 @@ febs 库是一些常用的工具的合集; | ||
- [net](#net) | ||
- [dom](./browser/README.md#dom) | ||
@@ -76,0 +77,0 @@ - 客户端独有库 |
@@ -10,4 +10,4 @@ | ||
exports.net = require('./net'); | ||
exports.dom = require('../browser/libs/dom'); | ||
// | ||
@@ -14,0 +14,0 @@ // define the __line. __filename. |
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
6414995
96
63805
875