Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Use addEventListener in animation/frontend.js

$
0
0

Replies: 0

We’ve got a conflict issue with your plugin that relates to the direct use of window.onload here: https://github.com/Codeinwp/otter-blocks/blob/master/src/animation/frontend.js#L131.

window.onload only allows one function to be defined, which is problematic, and instead one should use addEventListener. Otherwise your plugin will conflict with any other definition of window.onload. We’ve fixed this [here](https://github.com/perfectyorg/perfecty-push-wp/issues/125) in our side but just for your awareness.


Viewing all articles
Browse latest Browse all 59525

Trending Articles