fixing bug with not deeply triggering the afterAttach event

This commit is contained in:
Danny Yoo 2011-07-22 02:17:33 -04:00
parent 26cd925d37
commit bd4b7e5e9b
2 changed files with 5 additions and 4 deletions

View File

@ -16,7 +16,7 @@
StandardOutputPort.prototype = baselib.heir(OutputPort.prototype); StandardOutputPort.prototype = baselib.heir(OutputPort.prototype);
StandardOutputPort.prototype.writeDomNode = function(MACHINE, domNode) { StandardOutputPort.prototype.writeDomNode = function(MACHINE, domNode) {
MACHINE.params['currentDisplayer'](MACHINE, domNode); MACHINE.params['currentDisplayer'](MACHINE, domNode);
jQuery(domNode).trigger({type : 'afterAttach'}); jQuery('*', domNode).trigger({type : 'afterAttach'});
}; };
var StandardErrorPort = function() { var StandardErrorPort = function() {
@ -25,7 +25,7 @@
StandardErrorPort.prototype = baselib.heir(OutputPort.prototype); StandardErrorPort.prototype = baselib.heir(OutputPort.prototype);
StandardErrorPort.prototype.writeDomNode = function(MACHINE, domNode) { StandardErrorPort.prototype.writeDomNode = function(MACHINE, domNode) {
MACHINE.params['currentErrorDisplayer'](MACHINE, domNode); MACHINE.params['currentErrorDisplayer'](MACHINE, domNode);
jQuery(domNode).trigger({type : 'afterAttach'}); jQuery('*', domNode).trigger({type : 'afterAttach'});
}; };

View File

@ -27,8 +27,9 @@ var bigBang = function(MACHINE, initW, handlers) {
var oldArgcount = MACHINE.argcount; var oldArgcount = MACHINE.argcount;
var toplevelNode = $('<span/>').get(0); var outerToplevelNode = $('<span/>').get(0);
MACHINE.params.currentOutputPort.writeDomNode(MACHINE, toplevelNode); MACHINE.params.currentOutputPort.writeDomNode(MACHINE, outerToplevelNode);
var toplevelNode = $('<span/>').appendTo(outerToplevelNode).get(0);
var configs = []; var configs = [];
var isOutputConfigSeen = false; var isOutputConfigSeen = false;