I'm building a mobile application using IBM Worklight. In an adapter, I need to use some functionality which is provided by a third party JavaScript file. I want to know if it's possible to include such a file on the server? If not, what is the alternative?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
At the moment there is no way to include an external JavaScript library in the Adapter code. Currently the only workaround is to copy the library code to the adapter.
回答2:
In Worklight 6.0.0, IBM introduced Node.js adapters, touting "a huge selection of third-party modules extending connectivity and providing implementations of various common backend constructs". That sounds like JS library support to me. Details here: https://www.ibm.com/developerworks/community/blogs/worklight/entry/a_preview_of_node_js_adapters_in_worklight_6_0_0?lang=en