This post was authored by Ina Uzunova, Product Owner of vSphere Client SDK
- It uses a single shared global object for all plugins. As a result, other plugins that have an older version of that file, and are installed on the same vSphere environment where your plugin is installed, may override the same shared global object. This may impact your plugin’s functionality.
The mechanism is simple, yet powerful and easy to use. Instead of including the web-platform.js in your plugin package, you can access the same set of JS APIs by a single call:
this.webPlatform = window.parent.vSphereClientSDK.getWebPlatformApi(window);
The advantages of this new bootstrapping mechanism are:
- You no longer share a global object with other plugins and they cannot impact your plugin’s functionality.
For more details please refer to the official documentation and the HTML Client SDK samples available from the \html-client-sdk\samples directory.