Workaround a issue of JavaScriptCore that create document failed after first run:
- rename the document creation method to IGHTMLDocumentCreateWithHTML.
- set IGHTMLDocument in javascript context with the IGHTMLDocument class.