Sorry for the delayed response, I was off the grid for a couple days.
doc.baseURI = url;
which should do the trick. (where doc may be the global document, text is
you html string, and url is what document.location will use to report url
PS, setting document.async = false makes parsing much much faster at this
point until we have time to track down an issue. this basically has a trade
off that you cant use document.write calls mid-parse but we will get that