js-widget icon indicating copy to clipboard operation
js-widget copied to clipboard

re-assign `window[window['JS-Widget']]`

Open nalbion opened this issue 5 years ago • 1 comments

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.

nalbion avatar Aug 20 '19 03:08 nalbion

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.

jenyayel avatar Aug 20 '19 19:08 jenyayel