Phantomjs-onloadstarted

提供:Dev Guides
2020年6月23日 (火) 08:10時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

PhantomJS-onLoadStarted()

このコールバックは、ページの読み込みが開始されるときに呼び出されます。

構文

その構文は次のとおりです-

wpage.onLoadStarted = function() {}

var wpage = require('webpage').create();
wpage.onLoadStarted = function() {
   console.log('File has started Loading');
}
wpage.open("http://localhost/tasks/filel", function(status) {
   console.log(status);
});

上記のプログラムは、次の output を生成します。

File has started Loading
Success