📜  javascript 监听数组更改 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:30.248000             🧑  作者: Mango

代码示例1
function processQ() {
   // ... this will be called on each .push
}

var myEventsQ = [];
myEventsQ.push = function() { Array.prototype.push.apply(this, arguments);  processQ();};