Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
UTF8 support rolled in (both for external docs and innerHTML).
  • Loading branch information
jeresig committed Jul 8, 2007
1 parent feb475d commit 5e7c1fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/runtest/env.js
Expand Up @@ -12,7 +12,9 @@ var window = this;
};

window.__defineSetter__("location", function(url){
window.document = new DOMDocument(url);
window.document = new DOMDocument(
new Packages.org.xml.sax.InputSource( new java.io.InputStreamReader(
new java.io.FileInputStream(url))));
});

window.__defineGetter__("location", function(url){
Expand Down Expand Up @@ -256,7 +258,7 @@ var window = this;
var nodes = this.ownerDocument.importNode(
new DOMDocument( new java.io.ByteArrayInputStream(
(new java.lang.String("<wrap>" + html + "</wrap>"))
.getBytes())).documentElement, true).childNodes;
.getBytes("UTF8"))).documentElement, true).childNodes;

while (this.firstChild)
this.removeChild( this.firstChild );
Expand Down

0 comments on commit 5e7c1fc

Please sign in to comment.