fabi1cazenave / webL10n

Client-side internationalization / localization library
http://fabi1cazenave.github.com/webL10n/
278 stars 70 forks source link

l10n.js cannot be <script defer>'d #30

Closed timdream closed 11 years ago

timdream commented 11 years ago

Because of bug 688580, if l10n.js is loaded with <script defer> over a HTTP webpage, the DOMContentLoaded listener added in the script event will never fire. The page will never be localized.

According to spec, deferred script should block the event and other browsers implemented as such.

Unfortunately document.readyState will be interactive in both browsers.

Need to find a way to workaround this bug, in order to make webL10n fit this use case (and all other use cases).

timdream commented 11 years ago

By the way, an attempt to manually localize the page would result the page on other browser being localized twice.

I tend to think we should fix the browser-specific startup part in the script than workaround it externally.

timdream commented 11 years ago

See also https://bugzilla.mozilla.org/show_bug.cgi?id=831228