Created
January 5, 2015 18:16
-
-
Save paceaux/d222e66303ee42138cb6 to your computer and use it in GitHub Desktop.
return a Tridion view frame as an object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uiFrame = function (viewName) { | |
var frameIndex = 0, tridionView; | |
while (windowFrame = window.top.frames[frameIndex++]) | |
{ | |
if ( (tridionView = windowFrame.$display && windowFrame.$display.getView() ) && tridionView.getId() === viewName) | |
{ | |
return tridionView; | |
} | |
} | |
console.log(tridionView); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment