diff --git a/rune/package.json b/rune/package.json index 2594af4..2e220df 100644 --- a/rune/package.json +++ b/rune/package.json @@ -1,6 +1,6 @@ { "name": "rune-ts", - "version": "0.8.7", + "version": "0.8.8", "description": "Rune Core Library", "engines": { "node": ">=14.0.0" diff --git a/rune/src/CustomEventWithDetail.ts b/rune/src/CustomEventWithDetail.ts index 3949809..fbf1989 100644 --- a/rune/src/CustomEventWithDetail.ts +++ b/rune/src/CustomEventWithDetail.ts @@ -1,3 +1,5 @@ +import { _camelToColonSeparated } from './lib/_camelToColonSeparated'; + if (typeof global !== 'undefined') { global.CustomEvent = global.CustomEvent || @@ -10,7 +12,11 @@ if (typeof global !== 'undefined') { }; } -export class CustomEventWithoutDetail extends CustomEvent {} +export class CustomEventWithoutDetail extends CustomEvent { + static override toString() { + return _camelToColonSeparated(this.name); + } +} export class CustomEventOptionalDetail extends CustomEvent {} @@ -31,4 +37,8 @@ export class CustomEventWithDetail extends CustomEvent { } private readonly isCustomEventWithDetail = true; + + static override toString() { + return _camelToColonSeparated(this.name); + } }