WordPress.org

Forums

MP6
Prototype.js breaks svg-painter (2 posts)

  1. ungestaltbar
    Member
    Posted 1 year ago #

    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

    http://wordpress.org/plugins/mp6/

  2. Till
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.