@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.esm.js
CHANGED
|
@@ -5291,8 +5291,12 @@ class Utils {
|
|
|
5291
5291
|
* @param target 目标元素
|
|
5292
5292
|
* @param callback 触发的回调
|
|
5293
5293
|
* @param options 观察器配置
|
|
5294
|
+
* @example
|
|
5295
|
+
* Utils.mutationVisible(document.querySelector("div.xxxx"),(entries,observer)=>{
|
|
5296
|
+
* console.log("该元素出现在视图内");
|
|
5297
|
+
* }))
|
|
5294
5298
|
*/
|
|
5295
|
-
|
|
5299
|
+
mutationVisible(target, callback, options) {
|
|
5296
5300
|
if (typeof IntersectionObserver === "undefined") {
|
|
5297
5301
|
throw new TypeError("IntersectionObserver is not defined");
|
|
5298
5302
|
}
|