0

Web ブラウザー コントロールに表示される Web コンテンツを変更していて、すべての変更が適用されるまでそれらを表示しない方法を探しています。

私は現在 DocumentComplete イベントを使用していますが、一部のページをフィルタリングしている間、それらのコンテンツは表示されています。ですから、すべてが表示されるようになるまで非表示にしたいと思います。

simple.html

<html>
<head>
<style type="text/css">
div {
    font-weight: bold;
}
</style>
</head>
<body><div>foo</div> bar</body>
</html> 

デモスクリプト

new WBControl("file:///" A_ScriptDir "/simple.html")

class WBControl {

    DocumentComplete(oParams*) {
        doc :=  oParams[3].document
        sleep 200   ; simulate a delay caused by a heavy task
        doc.styleSheets[0].rules[0].style.fontweight := "normal"
    }

    __New(strURL="") {
        static WB
        Gui, New, Resize MaximizeBox
        Gui, Add, ActiveX, vWB w780 h580, Shell.Explorer  
        Gui, show, w800 h600
        ComObjConnect(WB, this)
        WB.Navigate(strURL)
    }   
}

それを行う方法はありますか?

4

1 に答える 1

0

試す:

document.body.style.visibility := "hidden"

可視性を復元するには、空の文字列に設定します。

document.body.style.visibility := ""

代わりに表示する単純な読み込み表示を作成することもできます。おしゃれになりたいなら。

于 2012-11-16T11:05:41.743 に答える