xulrunner,C#:如何更改 html?

xulrunner, C#: how to change html?

我将项目移至自定义 WebBrowser,并选择 XULRunner。我正在使用 XULRunner 33 和 GeckoFX 33。所以,我将它添加到项目中并对其进行初始化。

在我的程序中,我使用了自定义的 html 场景,但是如何更改 html? WebBrowser 示例是:webBrowser1.DocumentText = "html code here"; 但是 XULRunner 只有 Document(只读)、DocumentTitle、DomDocument(还有)、Text(不影响),我不能用它来改变 html。怎么可能?

通常,html 是用某种脚本语言修改的,XUL 支持 scripting. According to Wikipedia's XUL page, the BlueGriffon html 编辑器使用 JavaScript 与您选择的相同技术。

Geckofx 33 有 LoadHtml 方法而不是 DocumentText。所以,例如:

geckoWebBrowser.LoadHtml("html code here", "url of a page here");