7PH / powerglitch

Tiny JS library to glitch anything on the web
https://7ph.github.io/powerglitch/
MIT License
764 stars 9 forks source link

In Firefox, PowerGlitch produces hundreds of console warnings on initialize #17

Closed zstiles closed 1 year ago

zstiles commented 1 year ago

When loading a page with PowerGlitch in Mozilla Firefox, the following console warning is seen: Keyframe property value “” is invalid according to the syntax for “transform”. This occurs upwards of 400 - 800 times (it's not consistent) in rapid succession.

I am not seeing the issue in Google Chrome or Microsoft Edge. In addition to my own project, this can be seen on the PowerGlitch homepage itself: screenshot

7PH commented 1 year ago

Hi @zstiles, I'll take a look once I'm back from vacations on Tuesday, thank you for reporting 👍

Could you please check your Firefox version in the meantime?

zstiles commented 1 year ago

I'm on 108.0.1 (64-bit), the latest version.

7PH commented 1 year ago

I believe this should be an easy fix, replacing the empty string with none (1) here: https://github.com/7PH/powerglitch/blob/master/src/index.ts#L259

I'll make the fix when I'm back and bump the version 👍

(1): https://developer.mozilla.org/en-US/docs/Web/CSS/transform#formal_definition

zstiles commented 1 year ago

Excellent, and thanks for the great library! 👍

7PH commented 1 year ago

Hi again @zstiles, 2.3.2 is published removing this warning Thank you for suggesting this fix 👍

zstiles commented 1 year ago

Looks good, thanks again! 🔥🔥🔥