イベントタイプを分けた
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5693 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
402ac9cd88
commit
0a7fa134e2
@ -112,7 +112,7 @@
|
|||||||
catch(e) {
|
catch(e) {
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
this._dispatchEvent(options, data, done);
|
this._dispatchEvent('UIOperationGlobalHistoryUndo', options, data, done);
|
||||||
this._doingUndo = false;
|
this._doingUndo = false;
|
||||||
|
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
@ -140,7 +140,7 @@
|
|||||||
catch(e) {
|
catch(e) {
|
||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
this._dispatchEvent(options, data, done);
|
this._dispatchEvent('UIOperationGlobalHistoryRedo', options, data, done);
|
||||||
this._doingUndo = false;
|
this._doingUndo = false;
|
||||||
|
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
@ -214,11 +214,11 @@
|
|||||||
window.removeEventListener('unload', this, false);
|
window.removeEventListener('unload', this, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_dispatchEvent : function(aOptions, aData, aDone)
|
_dispatchEvent : function(aType, aOptions, aData, aDone)
|
||||||
{
|
{
|
||||||
var d = aOptions.window ? aOptions.window.document : document ;
|
var d = aOptions.window ? aOptions.window.document : document ;
|
||||||
var event = d.createEvent('Events');
|
var event = d.createEvent('Events');
|
||||||
event.initEvent('UIOperationGlobalHistoryUndo', true, false);
|
event.initEvent(aType, true, false);
|
||||||
event.name = aOptions.name;
|
event.name = aOptions.name;
|
||||||
event.data = aData;
|
event.data = aData;
|
||||||
event.done = aDone;
|
event.done = aDone;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user