Skip to main content

Bug Tracker

Side navigation

#4284 closed feature (fixed)

Opened March 03, 2009 01:13AM UTC

Closed December 09, 2009 09:17PM UTC

Method to copy entire data object from element

Reported by: sliver Owned by:
Priority: minor Milestone: 1.4
Component: data Version: 1.4a1
Keywords: data copy clone Cc:
Blocked by: Blocking:
Attachments (0)
Change History (5)

Changed March 03, 2009 03:23AM UTC by dmethvin comment:1

One possible approach would be to have

$("el").data()
return the entire data hash for the element, and
$("el").data(hash)
set the entire hash. Then the copy operation would just be:

$("#dst").data($("#src").data());

Would that set the #dst data object to the #src object, or would it use $.extend internally to make a copy?

Changed March 18, 2009 07:53PM UTC by brandon comment:2

Are events expected to be copied in this method as well? If so, each event will have to be rebound like we do in clone.

Changed June 02, 2009 10:18AM UTC by mikecapp comment:3

Affects #4191 and #4346

Changed August 07, 2009 05:13PM UTC by dmethvin comment:4

component: unfilleddata

Changed December 09, 2009 09:17PM UTC by john comment:5

resolution: → fixed
status: newclosed
type: enhancementfeature
version: 1.3.21.4a1