diff --git a/package.json b/package.json index 8af1bcc..0b11ec1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsdom-testing-mocks", - "version": "1.15.0", + "version": "1.15.1", "author": "Ivan Galiatin", "license": "MIT", "description": "A set of tools for emulating browser behavior in jsdom environment", diff --git a/src/mocks/web-animations-api/AnimationEffect.ts b/src/mocks/web-animations-api/AnimationEffect.ts index bc2c511..32345fb 100644 --- a/src/mocks/web-animations-api/AnimationEffect.ts +++ b/src/mocks/web-animations-api/AnimationEffect.ts @@ -18,7 +18,9 @@ class MockedAnimationEffect implements AnimationEffect { } } - #getNormalizedDuration(): number { + // Changed from private (#getNormalizedDuration) to protected (_getNormalizedDuration) + // to allow access from child classes in all JavaScript environments + protected _getNormalizedDuration(): number { // the only possible value is "auto" if (typeof this.#timing.duration === 'string') { return 0; @@ -34,7 +36,7 @@ class MockedAnimationEffect implements AnimationEffect { getComputedTiming(): ComputedEffectTiming { // duration of the animation - const duration = this.#getNormalizedDuration(); + const duration = this._getNormalizedDuration(); // Calculated as (iteration_duration * iteration_count) const activeDuration =