Resco JavaScript Bridge: Difference between revisions

Jump to navigation Jump to search
Line 106: Line 106:


Depending on the code of the external library, it might or might not run. So far, we have successfully used many third-party libraries and components, including popular frameworks like jQuery or D3 for data visualization.
Depending on the code of the external library, it might or might not run. So far, we have successfully used many third-party libraries and components, including popular frameworks like jQuery or D3 for data visualization.
;React
* JSBridge.js is not written as an ES module. As such, it cannot be imported or required by third-party libraries. If you include it as an HTML script, the global variable <code>MobileCRM</code> should be available.
* This may cause problems with linter or similar tools; for example, the one within the create-react-app tool. The solution is to explain the linter or (or compiler if using typescript) that the global variable <code>MobileCRM</code> exists.
* For example: <code>const MobileCRM = window.MobileCRM;</code>


== Asynchronous approach ==
== Asynchronous approach ==

Navigation menu