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

Wait until gReadyState == 'complete' before triggering firing onready #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Rob--W
Copy link
Collaborator

@Rob--W Rob--W commented Jul 16, 2015

gReadyState == 'interactive' is before all external localization files are loaded. The localization event itself is also triggered right when gReadyState == 'complete'. So we have to wait until gReadyState == 'complete' before calling the callback.

Fixes #64 (comment) (@paulguz)

gReadyState == 'interactive' is before all external localization
files are loaded. The localization event itself is also triggered
right when gReadyState == 'complete'.
With this change, it is possible to have readyState transitions
loading -> interactive -> complete -> interactive -> complete instead of
loading -> interactive -> complete.

This change allows the document.webL10n.ready(callback) method to wait
until all l10n files have been loaded when loadLocale is called again.
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.

1 participant