-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Unclear whether this is worth "fixing" (whatever that means), but I think it's worth at least discussing even if we decide just to document a workaround.
If you subclass jQuery with Pjs, many methods that aren't supposed to mutate this, like .appendTo(), will add elements to this: http://jsbin.com/faxifed/edit?html,console,output
This was causing exponentially growing jQuery sets in MathQuill (mathquill/mathquill#629).
This is because jQuery internally calls this.constructor() which normally creates a whole new jQuery object, but for Pjs subclasses starting with #20 on v5.0.0 just returns this: https://github.com/jquery/jquery/blob/305f193aa57014dc7d8fa0739a3fefd47166cd44/src/core.js#L72-L84
Thanks @jwmerrill!
Metadata
Metadata
Assignees
Labels
No labels