WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ungestaltbar
    Member
    Posted 6 months 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 Krüss
    Member
    Plugin Author

    Posted 6 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.