Tuesday, 13 August 2013

How do I prevent a jQuery extend deep copy from copying some of my custom properties?

How do I prevent a jQuery extend deep copy from copying some of my custom
properties?

I have some custom properties on some of my objects, which I would like to
keep unique per object.
Some third party code, however, is attempting to use jQuery to .extend
some of my objects - with the deep-copy flag turned on.
I would like to prevent these properties from being deep copied. My
intuition is to overwrite the jQuery.extend (and jQuery.fn.extend)
functions, with functions which ignore my properties, but that sounds like
overkill.

No comments:

Post a Comment