@whitesev/utils 2.2.3 → 2.2.5
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/dist/index.amd.js +5 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +5 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +5 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +5 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +5 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Utils.d.ts +5 -1
- package/package.json +1 -1
- package/src/Utils.ts +5 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5293,8 +5293,12 @@ class Utils {
|
|
|
5293
5293
|
* @param target 目标元素
|
|
5294
5294
|
* @param callback 触发的回调
|
|
5295
5295
|
* @param options 观察器配置
|
|
5296
|
+
* @example
|
|
5297
|
+
* Utils.mutationVisible(document.querySelector("div.xxxx"),(entries,observer)=>{
|
|
5298
|
+
* console.log("该元素出现在视图内");
|
|
5299
|
+
* }))
|
|
5296
5300
|
*/
|
|
5297
|
-
|
|
5301
|
+
mutationVisible(target, callback, options) {
|
|
5298
5302
|
if (typeof IntersectionObserver === "undefined") {
|
|
5299
5303
|
throw new TypeError("IntersectionObserver is not defined");
|
|
5300
5304
|
}
|