- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 雜項
- 命令列介面
- PhantomJS - 螢幕捕獲
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 實用資源
- PhantomJS - 快速指南
- PhantomJS - 實用資源
- PhantomJS - 討論
PhantomJS - onInitialized()
該回調在頁面被呼叫但在其載入之前呼叫。
語法
其語法如下 −
page.onInitialized = function() {}
示例
var wpage = require('webpage').create();
wpage.onInitialized = function() {
console.log('File is initialized');
}
wpage.open("https:///tasks/file.html", function(status) {
console.log(status);
});
以上程式生成以下 輸出。
Success File is initialized
phantomjs_webpage_module_events_callbacks.htm
廣告