Bug Tracker

Ticket #4284 (closed feature: fixed)

Opened 7 years ago

Last modified 6 years ago

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:
Blocking: Blocked by:

Change History

comment:1 Changed 7 years ago by dmethvin

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:


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

comment:2 Changed 7 years ago by brandon

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.

comment:3 Changed 6 years ago by mikecapp

Affects #4191 and #4346

comment:4 Changed 6 years ago by dmethvin

  • Component changed from unfilled to data

comment:5 Changed 6 years ago by john

  • Status changed from new to closed
  • Type changed from enhancement to feature
  • Version changed from 1.3.2 to 1.4a1
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.