- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- 網路伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 其他
- 命令列介面
- PhantomJS - 螢幕捕獲
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 有用資源
- PhantomJS - 快速指南
- PhantomJS - 有用資源
- PhantomJS - 討論
PhantomJS - release()
release 方法將釋放頁面中使用的記憶體堆。 release 被呼叫後,不要使用頁面例項方法。此方法類似於 close,並且其用法已被棄用。建議改用 wpage.close()。
語法
其語法如下 −
var wpage = require('webpage').create();
wpage.release
示例
var wpage = require('webpage').create();
wpage.open('https:///tasks/a.html', function() {
console.log("page is opened");
wpage.close();
phantom.exit();
});
以上程式生成以下輸出。
page is opened
phantomjs_webpage_module_methods.htm
廣告