2 Replies Latest reply on Nov 26, 2013 3:16 AM by lfryc

    Support for JavaScript Objects


      Hi Arquillian Community,


      today I worte my first Arquillian test integrating calls to JavaScript code using the @JavaScript extension. Works like a charm as far as I can say, thanks!


      Let me propose one improvement though:

      At the moment String, Enum, Lists and several primitive types are supported. We often have JavaScript functions (written ourselves or from existing libraries) that take or return JavaScript objects as parameters.

      For example: return { left: bounds.left, bottom: bounds.bottom, right: bounds.right, top: bounds.top } in JavaScript

      At the moment these cannot be called with an interface with @JavaScript annotation. So I have to write intermediate JavaScript functions that perform the original call and return one of the values left, bottom, right, top one parameter per function.

      I'd consider it very useful if JavaScript objects could be converted to/from java.util.Map on the Java side instead.


      Any similar experiences? Ideas?


      With kind regards