bugfix
This commit is contained in:
parent
935b1da0d0
commit
adfa214047
@ -344,19 +344,19 @@ bricks.buildScriptHandler = function(w, target, rtdata, desc){
|
|||||||
bricks.extend(params, rtdata);
|
bricks.extend(params, rtdata);
|
||||||
params = bricks.apply_data(params, rtdata);
|
params = bricks.apply_data(params, rtdata);
|
||||||
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
|
var AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
|
||||||
var f = new AsyncFunction('target', 'params', 'event', desc.script);
|
var f = new AsyncFunction('params', 'event', desc.script);
|
||||||
return f.bind(target, target, params);
|
return f.bind(target, params);
|
||||||
}
|
}
|
||||||
bricks.buildDispatchEventHandler = function(w, target, rtdata, desc){
|
bricks.buildDispatchEventHandler = function(w, target, rtdata, desc){
|
||||||
var f = function(target, event_name, params, event){
|
var f = function(event_name, params, event){
|
||||||
console.log('target=', target, 'event_name=', event_name, 'params=', params, 'Arguments=', arguments);
|
// console.log('target=', target, 'event_name=', event_name, 'params=', params, 'Arguments=', arguments);
|
||||||
target.dispatch(event_name, params);
|
this.dispatch(event_name, params);
|
||||||
}
|
}
|
||||||
var params = {};
|
var params = {};
|
||||||
bricks.extend(params, desc.params)
|
bricks.extend(params, desc.params)
|
||||||
bricks.extend(params, rtdata);
|
bricks.extend(params, rtdata);
|
||||||
params = bricks.apply_data(params, rtdata);
|
params = bricks.apply_data(params, rtdata);
|
||||||
return f.bind(target, target, desc.dispatch_event, params);
|
return f.bind(target, desc.dispatch_event, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
bricks.getWidgetById = function(id, from_widget){
|
bricks.getWidgetById = function(id, from_widget){
|
||||||
|
Loading…
Reference in New Issue
Block a user