1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

PhantomJS 1.7 compatibility.

Note that 1.7 is not yet released.
This commit is contained in:
Jon Leighton 2012-09-19 22:30:11 +01:00
parent 8ffff0a65f
commit 5165a63ec4
3 changed files with 15 additions and 0 deletions

View file

@ -206,6 +206,9 @@ makes debugging easier). Running `rake autocompile` will watch the
* Fix the text method for title elements, so it doesn't return an
empty string.
* Fixed problem with cookies not being clearer between tests on
PhantomJS 1.7
### 0.7.0 ###
#### Features ####

View file

@ -52,6 +52,13 @@ Poltergeist.WebPage = (function() {
_fn1(delegate);
}
WebPage.prototype.release = function() {
if (this["native"].clearCookies) {
this["native"].clearCookies();
}
return this["native"].release();
};
WebPage.prototype.onInitializedNative = function() {
this._source = null;
this.injectAgent();

View file

@ -30,6 +30,11 @@ class Poltergeist.WebPage
this.prototype[delegate] =
-> @native[delegate].apply(@native, arguments)
release: ->
# Conditional can be removed once we drop PhantomJS 1.6 support
@native.clearCookies() if @native.clearCookies
@native.release()
onInitializedNative: ->
@_source = null
this.injectAgent()