mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-04 11:03:13 +00:00
rename MutationObserverInit -> MutationObserverOptions to avoid naming collisions
This commit is contained in:
1 parent
a81d28426b
commit
a84a89fb5b
3 files changed
+3
-5
No files matched your search
+1
-1
@@ -9,7 +9,7 @@
|
||||
* `SQLite`: `3.53.4.0` -> `3.54.1.0`
|
||||
* `Ktor`: `3.6.0` -> `3.6.1`
|
||||
* `Common`:
|
||||
* Add JS `MutationObserverInit` factory that omits unspecified options and preserves browser defaults.
|
||||
* Add JS `MutationObserverOptions` factory that omits unspecified options and preserves browser defaults.
|
||||
* Use safe `MutationObserver` options in `onRemoved` and cover DOM observation and outside-click cleanup with browser tests.
|
||||
|
||||
## 0.32.1
|
||||
|
||||
@@ -19,7 +19,7 @@ fun Node.onRemoved(block: () -> Unit): MutationObserver {
|
||||
}
|
||||
}
|
||||
|
||||
observer.observe(document, MutationObserverInit(childList = true, subtree = true))
|
||||
observer.observe(document, MutationObserverOptions(childList = true, subtree = true))
|
||||
return observer
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package dev.inmo.micro_utils.common
|
||||
|
||||
import org.w3c.dom.MutationObserverInit as NativeMutationObserverInit
|
||||
|
||||
/**
|
||||
* Creates options for [org.w3c.dom.MutationObserver] without adding unspecified properties.
|
||||
*
|
||||
@@ -12,7 +10,7 @@ import org.w3c.dom.MutationObserverInit as NativeMutationObserverInit
|
||||
* Null arguments are omitted. Explicit false values and empty arrays are preserved. The browser remains responsible
|
||||
* for validating the options passed to [org.w3c.dom.MutationObserver.observe].
|
||||
*/
|
||||
fun MutationObserverInit(
|
||||
fun MutationObserverOptions(
|
||||
childList: Boolean? = null,
|
||||
attributes: Boolean? = null,
|
||||
characterData: Boolean? = null,
|
||||
|
||||
Reference in new issue
Block a user