Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw something when widget is actually not initialized #284

Closed
homm opened this issue Nov 18, 2015 · 5 comments
Closed

Throw something when widget is actually not initialized #284

homm opened this issue Nov 18, 2015 · 5 comments

Comments

@homm
Copy link
Contributor

homm commented Nov 18, 2015

For now uploadcare.Widget(".class") always successful, even if .class doesn't exist or there are many .class tags on the pages. An error should be thrown in the first case and warning in the second.

@ZNick1982
Copy link
Contributor

I found several widget initialisators in the code: ns.Widget, ns.SingleWidget, ns.MultipleWidget
Should I add this check only for ns.Widget or I should modify other methods to?

@homm
Copy link
Contributor Author

homm commented Feb 15, 2016

They are all use initializeWidget internal.

@ZNick1982
Copy link
Contributor

Yes I saw it, Ok, I will update initializeWidget method

@homm
Copy link
Contributor Author

homm commented Feb 15, 2016

Yes, please.

The difference between ns.Widget and ns.[Single/Multiple]Widget is the first doesn't check the type of the widget while the second does. This can be important when you want to be sure that the widget is single or multiple because they have different API.

ZNick1982 added a commit to ZNick1982/uploadcare-widget that referenced this issue Feb 15, 2016
ZNick1982 added a commit to ZNick1982/uploadcare-widget that referenced this issue Feb 15, 2016
@ZNick1982
Copy link
Contributor

Done with pr: #310

homm added a commit that referenced this issue Feb 17, 2016
Throw something when widget is actually not initialized #284
@homm homm closed this as completed Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants