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

fix popFrame

This commit is contained in:
Jon Leighton 2013-03-03 19:38:19 +00:00
parent 3d0e86ca26
commit 698e63d9a3
2 changed files with 2 additions and 10 deletions

View file

@ -232,11 +232,7 @@ Poltergeist.WebPage = (function() {
WebPage.prototype.popFrame = function() {
this.frames.pop();
if (this.frames.length === 0) {
return this["native"].switchToMainFrame();
} else {
return this["native"].switchToFrame(this.frames[this.frames.length - 1]);
}
return this["native"].switchToParentFrame();
};
WebPage.prototype.getPage = function(name) {

View file

@ -158,11 +158,7 @@ class Poltergeist.WebPage
popFrame: ->
@frames.pop()
if @frames.length == 0
@native.switchToMainFrame()
else
@native.switchToFrame(@frames[@frames.length - 1])
@native.switchToParentFrame()
getPage: (name) ->
if @sub_pages[name]