Skip to content

Does not work in Firefox due to innertext #15

Description

@Burkazoid

Hi @JenniferSimonds

First off, thanks for the plugin. It's really good to have a tidy, neat solution to the font loading problem. :)

I've noticed the plugin does not work in Firefox, at least not for me. This seems to be because Firefox does not support setting element text using innerText (line 52).

An easy way to show this in the console is:

var span = document.createElement("span");
span.innerText = "foo";
console.log(span.outerHTML);

> "<span></span>"

Changing line 52 from span.innerText = aChars[eLang]; to span.textContent = aChars[eLang]; seems to solve the issue (although this won't work in IE8 or lower, but I think that's fine for most people).

I hope this helps!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions