Skip to content

re-assign window[window['JS-Widget']]#1

Open
nalbion wants to merge 1 commit into
jenyayel:masterfrom
nalbion:patch-1
Open

re-assign window[window['JS-Widget']]#1
nalbion wants to merge 1 commit into
jenyayel:masterfrom
nalbion:patch-1

Conversation

@nalbion
Copy link
Copy Markdown

@nalbion nalbion commented Aug 20, 2019

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']]`.

Also, `supportedAPI` seems redundant, line 46 could be moved to replace the default handler at line 56.
@jenyayel
Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants