Skip to content

Commit

Permalink
Demo working under polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Apr 6, 2015
1 parent e091fb0 commit 215869f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
var selector = document.querySelector('#selector');
var input = document.querySelector('#input');

I18nMsg.lang = selector.value || document.documentElement.lang || 'en';
// Event is only needed when running under the HTMLImports polyfill.
document.addEventListener('HTMLImportsLoaded', function() {
I18nMsg.lang = selector.value || document.documentElement.lang || 'en';
});

selector.addEventListener('change', function() {
document.documentElement.lang = this.value;
Expand Down

0 comments on commit 215869f

Please sign in to comment.