js-widget
js-widget copied to clipboard
re-assign `window[window['JS-Widget']]`
I don't understand why you reassign globalObject
but not window[window['JS-Widget']]
.
Also, supportedAPI
seems redundant, line 46 could be moved to replace the default handler at line 56.
I don't understand why you reassign globalObject but not window[window['JS-Widget']]
You are right. The thing is that this is just basic example - in real widget you will probably want to store configurations in separate service and expose API via some other service.
Also, supportedAPI seems redundant, line 46 could be moved to replace the default handler at line 56.
You are right here as well.