Prefix DOM events with skooma: for conflict-avoidance

This commit is contained in:
Talia 2024-09-07 12:26:34 +02:00
parent be2cbee5e6
commit 22558caa9e
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -48,7 +48,7 @@ const fallback = (value, whenUndefined) => typeof value != "undefined" ? value :
export class BeforeReplaceEvent extends Event {
/** @param {Element|Text} next */
constructor(next) {
super("beforereplace", { cancelable: true })
super("skooma:beforereplace", { cancelable: true })
this.next = next
}
}
@ -57,7 +57,7 @@ export class BeforeReplaceEvent extends Event {
export class AfterReplaceEvent extends Event {
/** @param {Element|Text} next */
constructor(next) {
super("afterreplace")
super("skooma:afterreplace")
this.next = next
}
}
@ -66,7 +66,7 @@ export class AfterReplaceEvent extends Event {
export class ReplacedEvent extends Event {
/** @param {Element|Text} old */
constructor(old) {
super("replaced", { bubbles: true })
super("skooma:replaced", { bubbles: true })
this.old = old
}
}