Skip to content

Instantly share code, notes, and snippets.

@paceaux
Created January 5, 2015 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paceaux/d222e66303ee42138cb6 to your computer and use it in GitHub Desktop.
Save paceaux/d222e66303ee42138cb6 to your computer and use it in GitHub Desktop.
return a Tridion view frame as an object
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