- 文件系统模块
- 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
广告