There is an example in Subscribing to Parent Events that shows I can subscribe to onscroll events from the parent window using 'canvas.scroll'
.
//Subscribe to the parent window onscroll event.
Sfdc.canvas(function() {
sr = JSON.parse('<%=signedRequestJson%>');
// Capture the onScrolling event of the parent window
Sfdc.canvas.client.subscribe(sr.client,
{name : 'canvas.scroll', onData : function (event) {
console.log("Parent's contentHeight; " + event.heights.contentHeight);
console.log("Parent's pageHeight; " + event.heights.pageHeight);
console.log("Parent's scrollTop; " + event.heights.scrollTop);
console.log("Parent's contentWidth; " + event.widths.contentWidth);
console.log("Parent's pageWidth; " + event.widths.pageWidth);
console.log("Parent's scrollLeft; " + event.widths.scrollLeft);
}}
);
});
What other events are there to subscribe to? I can't find any documentation beyond 'canvas.scroll'.
In particular, I'd like to know when the window is resized so I can manually resize the iframe using Sfdc.canvas.client.resize
.
So I found this in the documentation:
Currently, canvas.scroll (of the parent) is the only supported parent event in the canvas namespace.
Which I thought was the answer. But then I also found 'canvas.orientation'
in
Handling Orientation Changes in Your Canvas App (Added Summer '14).