How to use the @jupyter-widgets/base.shims function in @jupyter-widgets/base

To help you get started, we’ve selected a few @jupyter-widgets/base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyter-widgets / ipywidgets / examples / web3 / src / manager.ts View on Github external
async _create_comm(target_name: string, model_id: string, data?: any, metadata?: any): Promise {
            let comm = await this.kernel.connectToComm(target_name, model_id);
            if (data || metadata) {
                comm.open(data, metadata);
            }
            return Promise.resolve(new base.shims.services.Comm(comm));
        }
github jupyter-widgets / ipywidgets / examples / web-tmpnb / src / manager.ts View on Github external
async _create_comm(target_name: string, model_id: string, data?: any, metadata?: any): Promise {
            let comm = await this.kernel.connectToComm(target_name, model_id);
            if (data || metadata) {
                comm.open(data, metadata);
            }
            return Promise.resolve(new base.shims.services.Comm(comm));
        }