Clone this wiki locally
Developer reference. This page tries to gather limitations and issues with current browsers that make developing rasterizeHTML.js difficult at times. For outstanding browser bugs that limit the current use of the library see Limitations.
Background images need a workaround, https://bugzilla.mozilla.org/show_bug.cgi?id=789249Fixed in 17.0
Background images are quite often only shown after a reload of the page.Fixed in 17.0
The background image in example.html vanishes and re-appears in the phase of two keystrokes.Fixed in 17.0, Kind of broken in 18.0, Fixed in 19.0
- XMLSerializer has limited capabilities for HTML transformation (e.g. does not quote superfluous dashes in comments). Using our own implementation from http://cburgmer.github.io/xmlserializer/.
- Loading and parsing HTML documents via XHR2 does not work with local files, https://bugzilla.mozilla.org/show_bug.cgi?id=942138
- Documents loaded through XHR2 do not expose style sheets through CSSOM https://bugzilla.mozilla.org/show_bug.cgi?id=925493 (the negation is possibly a bug in WebKit instead).
The default font size (i.e. if none other set) seems to be around 0.001px (maybe https://code.google.com/p/chromium/issues/detail?id=348436 and https://bugs.webkit.org/show_bug.cgi?id=68090).fixed upstream
- Margins collapse across
<foreignObject>(Safari https://bugs.webkit.org/show_bug.cgi?id=23963) Workaround implemented
Chrome & Safari seem to ignore the first style rule when rendering SVG. However this does not seem to affect the rasterized result.Does not apply anymore to the current implementation
- The XMLSerializer interface does not require HTML documents to be serialized into XHTML and consequently this is not supported under Webkit (https://bugs.webkit.org/show_bug.cgi?id=47768). Using our own implementation from http://cburgmer.github.io/xmlserializer/.
Chrome can't parse a
backgroundImageURL on a dynamically created
Chrome can't set a
font-faceURL on a dynamically created
- Chrome can't set a
backgroundImageURL on a style rule: https://bugs.chromium.org/p/chromium/issues/detail?id=660663. Falling back to https://github.com/NV/CSSOM
- Reading from canvas after SVG from blob URL has been drawn fails (https://code.google.com/p/chromium/issues/detail?id=294129). Falling back to data:uri which has been made to work recently.
Media queries inworkaround provided and fixed upstream in the meantime
emwill not work and need to be expressed in
Chrome is not able to read back from the canvas (when using data:uri)fixed upstream
sans-seriffont-family will not be applied and Chrome falls back to using the
Safari has issues rendering a <PRE> with line breaks (see e.g. section "API" on http://cburgmer.github.com/rasterizeHTML.js/)Fixed in 6.0.2
Safari so far seems not to be able to load & parse an HTML document via AJAX. Only XML is supported, breaking the rendering from SVG (https://developer.mozilla.org/en/HTML_in_XMLHttpRequest)Fixed in recent versions
<style>elements inside SVGs in Safari have their
sheetattribute undefined (https://bugs.webkit.org/show_bug.cgi?id=163324, work around provided in https://github.com/cburgmer/rasterizeHTML.js/issues/158)