Skip to content

Commit

Permalink
Fix "not well-formed" error in Firefox.
Browse files Browse the repository at this point in the history
Firefox requires the mime type to be set on the XMLHttpRequest used to
load javascript modules (see http:https://stackoverflow.com/a/677943/1005455),
otherwise it spits a "not well-formed" error that pollutes the console.
I'm patching Yabble directly.
  • Loading branch information
Laurent Couvidou committed Dec 12, 2015
1 parent b1b16ef commit b941a61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/yabbler/yabble.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@

var xhr = this.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
var moduleUri = resolveModuleUri(moduleId);
xhr.overrideMimeType("application/json");
xhr.open('GET', moduleUri, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
Expand Down

0 comments on commit b941a61

Please sign in to comment.