mirror of
https://github.com/teampoltergeist/poltergeist.git
synced 2022-11-09 12:05:00 -05:00
fix popFrame
This commit is contained in:
parent
3d0e86ca26
commit
698e63d9a3
2 changed files with 2 additions and 10 deletions
|
@ -232,11 +232,7 @@ Poltergeist.WebPage = (function() {
|
||||||
|
|
||||||
WebPage.prototype.popFrame = function() {
|
WebPage.prototype.popFrame = function() {
|
||||||
this.frames.pop();
|
this.frames.pop();
|
||||||
if (this.frames.length === 0) {
|
return this["native"].switchToParentFrame();
|
||||||
return this["native"].switchToMainFrame();
|
|
||||||
} else {
|
|
||||||
return this["native"].switchToFrame(this.frames[this.frames.length - 1]);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
WebPage.prototype.getPage = function(name) {
|
WebPage.prototype.getPage = function(name) {
|
||||||
|
|
|
@ -158,11 +158,7 @@ class Poltergeist.WebPage
|
||||||
|
|
||||||
popFrame: ->
|
popFrame: ->
|
||||||
@frames.pop()
|
@frames.pop()
|
||||||
|
@native.switchToParentFrame()
|
||||||
if @frames.length == 0
|
|
||||||
@native.switchToMainFrame()
|
|
||||||
else
|
|
||||||
@native.switchToFrame(@frames[@frames.length - 1])
|
|
||||||
|
|
||||||
getPage: (name) ->
|
getPage: (name) ->
|
||||||
if @sub_pages[name]
|
if @sub_pages[name]
|
||||||
|
|
Loading…
Add table
Reference in a new issue