Added support for JS objects as UI options

The implementation uses an evil eval() so it's kina crappy, but still it
gets the job done.