JsMruby icon indicating copy to clipboard operation
JsMruby copied to clipboard

convert_js_to_mrb_object should not make hash for [object Object]

Open ppibburr opened this issue 12 years ago • 0 comments

should wrap the object as in the else statement. should use to_hash on JsObj to treat as hash.

example: in javascript an [object Object] has a function and needs 'this' to be the object. JsObj.get("x$('#foo')").click(aProc) will not work

example: to currently call a function on [object Object] foo['function'].call() is not as nice as foo.function()

XUI.js and other libraries use the above.

other note, functions are objects and can have properties ...

ppibburr avatar Oct 04 '12 01:10 ppibburr