How to use dojo dictionary object and dojo.mixin() function? -


i have function need override it.

myfunction.getextraconfig=function() { return {}; };

i need pass in object , have return multiple values.

how use dictionary {prop1: 1, prop2: 3}?

how use dojo.mixin() add return value?

is there sample code can refer to?

dojo's mixin function mixes objects' properties. return value in getextraconfig function not object property.

i'm not sure want, 1 way alter return value getextraconfig use dojo/aspect:

define(["dojo/_base/lang", "dojo/aspect"], function(lang, aspect){   //...   aspect.after(myfunction, "getextraconfig", function(original){       return lang.mixin(original, {prop1: 1, prop2: 3});   });   //... }); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

node.js - Bad Request - node js ajax post -

uitableview - Create and use custom prototype table cells in xamarin ios using storyboard -