Je lis "JavaScript the Good Parts" et mentionne les cascades comme un moyen de chaînage de méthodes en JavaScript mais je ne trouve pas de code expliquant comment ces méthodes devraient être implémentées.Comment implémenter JavaScript Cascades ..?
getElement('myBoxDiv').
move(350, 150).
width(100).
height(100).
color('red').
border('10px outset').
padding('4px').
appendText("Please stand by").
on('mousedown', function (m) {
this.startDrag(m, this.getNinth(m));
}).
on('mousemove', 'drag').
on('mouseup', 'stopDrag').
later(2000, function () {
this.
color('yellow').
setHTML("What hath God wraught?").
slide(400, 40, 200, 200);
}).
tip('This box is resizeable');
pouvez-vous expliquer plus à ce sujet. comme quand j'essaie cette méthode ne fonctionne pas pour moi – Anupam