• If someone enqueues prototype.js ( happens for the old built-in colorpicker for example ), prototype.js extends the prototype of the native array object (surprise).

    In that case this.elements on line 45 (svg-painter.js) is not an empty array and svg-painter will throw an error on line 47 where
    $element equals the “each”-method which was added by prototype.js.

    I’m not sure why this happens but something like:
    if ( this.elements.length > 0) { for var key ....{} }
    should be added for such edge cases maybe.

    regards

    https://www.ads-software.com/plugins/mp6/

Viewing 1 replies (of 1 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    What Prototype version are you enqueuing? Enqueuing Prototype v1.7.1 doesn’t through any errors.

Viewing 1 replies (of 1 total)
  • The topic ‘Prototype.js breaks svg-painter’ is closed to new replies.