@patternslib/patternslib
Version:
Patternslib is a JavaScript library that enables designers to build rich interactive prototypes without the need for writing any Javascript. All events are triggered by classes and other attributes in the HTML, without abusing the HTML as a programming la
15 lines (12 loc) • 385 B
JavaScript
/**
* Patterns remove - send event when objects are removed from the DOM
*
* Copyright 2012 Simplon B.V. - Wichert Akkerman
*/
import $ from "jquery";
var real_cleanData = $.cleanData;
$.cleanData = function remove_cleanData(elems) {
var i, el;
for (i = 0; (el = elems[i]) !== undefined; i++) $(el).triggerHandler("destroy");
real_cleanData.call(this, arguments);
};