Skip to content

Commit bcbfde5

Browse files
author
Christoph Burgmer
committed
Switch to html2xhtml.js as Chrome/Safari fallback. Fixes #12
1 parent 46e5e51 commit bcbfde5

8 files changed

+6443
-347
lines changed

dist/rasterizeHTML.allinone.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rasterizeHTML.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! rasterizeHTML.js - v0.4.1 - 2013-05-25
1+
/*! rasterizeHTML.js - v0.4.1 - 2013-09-17
22
* http://www.github.com/cburgmer/rasterizeHTML.js
33
* Copyright (c) 2013 Christoph Burgmer; Licensed MIT */
44

@@ -984,7 +984,7 @@ window.rasterizeHTMLInline = (function (module, window, URI) {
984984
return module;
985985
}(window.rasterizeHTMLInline || {}, window, URI));
986986

987-
window.rasterizeHTML = (function (rasterizeHTMLInline, hTMLtoXML, theWindow) {
987+
window.rasterizeHTML = (function (rasterizeHTMLInline, html2xhtml, theWindow) {
988988
"use strict";
989989

990990
var module = {};
@@ -1126,10 +1126,10 @@ window.rasterizeHTML = (function (rasterizeHTMLInline, hTMLtoXML, theWindow) {
11261126
doc.documentElement.setAttribute("xmlns", doc.documentElement.namespaceURI);
11271127
xml = (new theWindow.XMLSerializer()).serializeToString(doc.documentElement);
11281128
if (needsXMLParserWorkaround()) {
1129-
if (hTMLtoXML) {
1130-
return hTMLtoXML(xml);
1129+
if (html2xhtml) {
1130+
return html2xhtml(xml);
11311131
} else {
1132-
module.util.log("Looks like your browser needs htmlparser.js as workaround for writing XML. " +
1132+
module.util.log("Looks like your browser needs html2xhtml.js as workaround for writing XML. " +
11331133
"Please include it.");
11341134
return xml;
11351135
}
@@ -1398,4 +1398,4 @@ window.rasterizeHTML = (function (rasterizeHTMLInline, hTMLtoXML, theWindow) {
13981398
};
13991399

14001400
return module;
1401-
}(window.rasterizeHTMLInline, window.HTMLtoXML, window));
1401+
}(window.rasterizeHTMLInline, window.html2xhtml || window.HTMLtoXML, window));

dist/rasterizeHTML.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)