Default JS include should hide login button until login event is bound #66
Comments
If you use the new "Observer" API (available in production now, but semi-broken in IE8), you can do this by registering an Docs for the Observer API are at https://developer.mozilla.org/en/DOM/navigator.id We should have the IE8 bug fixed by the end of July at the absolute latest, and we'll be deprecating the current API as soon as that happens. |
@callahad |
It is, MDN docs should be updated by Monday. Here's a wip-branch description of it:
|
There's still nothing on https://developer.mozilla.org/en-US/docs/Web/API/navigator.id?redirectlocale=en-US&redirectslug=DOM%2Fnavigator.id about onready. |
Woah, wtf, I'm a jerk. |
Did a bit of noodling on this, and I'm not convinced that hiding and showing should be default behavior. If we make login buttons hidden by default we introduce edge cases like login buttons injected into the page after the page has finished loading. Instead, I think the real thing here is to just add support for |
@jsocol pointed out that if JS loads slowly, users may attempt to click the login button before the click event for launching the BrowserID popup is bound.
MDN handles this by hiding the button with CSS and showing it after the event is bound. Our default JS and code example should do something similar to encourage good behavior.
The text was updated successfully, but these errors were encountered: