public HtmlDocument OpenNew(bool replaceInHistory)
        {
            object name     = replaceInHistory ? "replace" : "";
            object features = null;

            System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument doc = this.NativeHtmlDocument2.Open("text/html", name, features, features) as System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument;
            if (doc == null)
            {
                return(null);
            }
            return(new HtmlDocument(this.ShimManager, doc));
        }
 internal HtmlDocument(HtmlShimManager shimManager, System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument doc)
 {
     this.htmlDocument2 = (System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument2)doc;
     this.shimManager   = shimManager;
 }