
phantomjs - issue #654
Provide more "JS-like" API for the current Frame-Switching API
In issue #573 (http://code.google.com/p/phantomjs/issues/detail?id=573) I build a set of API to allow to change focus between the different frames that a page might contain.
During the work on issue #151 (http://code.google.com/p/phantomjs/issues/detail?id=151) I realised that the API was not JS-ish enough: method that return arrays and don't require any input parameters, for example, should be just read-only properties.
There is a thread about this here: https://groups.google.com/d/topic/phantomjs/3UCGk8he_4I/discussion
So, the idea is to provide a more "JS-ish" API to deprecate the other one: - frames[] - framesName[] - switchToFrame(name) - switchToFrame(int) - switchToMainFrame() //< not changed - switchToParentFrame() //< not changed - frameName
Of course, given that the other API have been released already in 1.6, we need to maintain those for now (I'd doubt many are already using it a part from GhostDriver, but there is a risk of breaking compatibility too soon).
Comment #1
Posted on Jul 12, 2012 by Quick WombatCorrection: there is not "frames[]": frames live within the page object. Switching frame changes the internal status of the page (i.e. which frame is in focus)
Comment #2
Posted on Jul 12, 2012 by Quick WombatAddressed by: https://github.com/ariya/phantomjs/pull/293
Comment #3
Posted on Sep 19, 2012 by Quick RabbitProvide more "JS-like" API for the current Frame-Switching API. https://github.com/ariya/phantomjs/commit/0ce4dcd71932669eeb963e4d8162db33db767479
Tests for the "new" Frame-Switching API https://github.com/ariya/phantomjs/commit/8d2384fd295572f19c1da5c088b2fc615247ff5e
Comment #4
Posted on Mar 16, 2013 by Happy HorseThis issue has been moved to GitHub: https://github.com/ariya/phantomjs/issues/10654
Status: Fixed
Labels:
Type-Defect
Priority-Medium
Milestone-Release1.7
webdriver
frames