WebGL compatibility issue: error due to font loading, with String.endsWith() method not supported in all browsers.

As I tried, but might have failed doing, I would like to report a bug on WebGL export for all browsers others that new Chrome and Firefox versions:


I checked the JS-code for Håvard Hombs example in the same thread, and it seems that the breaking code is introduced after he reported, so the fix for the original font loading problem might actually have produced this new problem.

Well the String.endsWith() method is still an Proposal and not in the final spec of ES6 even it most propably will end up in all browsers sooner or later. Or you could just use the polyfyll from the mozilla developer network site:

if (!String.prototype.endsWith) {
  String.prototype.endsWith = function(searchString, position) {
      var subjectString = this.toString();
      if (position === undefined || position > subjectString.length) {
        position = subjectString.length;
      position -= searchString.length;
      var lastIndex = subjectString.indexOf(searchString, position);
      return lastIndex !== -1 && lastIndex === position;

Thanks guys, we will get this fixed!

The issue has been fixed and will be available in a release in a few days.