Read Aloud the Text Content
This audio was created by Woord's Text to Speech service by content creators from all around the world.
Text Content or SSML code:
The environment in which a Visualforce page runs when Lightning Experience is enabled is different than the standard Visualforce request. The technical details get pretty complex, but the simple version is that in Lightning Experience, Visualforce pages are embedded in an HTML iframe that’s displayed inside the Lightning Experience app. This change has a number of consequences that mostly have to do with JavaScript and accessing external apps. You’ll want to review your code and verify a few things before you certify your Visualforce pages for use in Lightning Experience. We’re saving the nitty gritty details for the Visualforce & Lightning Experience module. For now, let’s just check in at a high level so you can start to scope your review. For starters, if you have pages or apps that use JavaScript, you’ll want to review the behavior of the code. In particular, your code can’t directly access the window global object. You can still get at it with a minor code change if you really need to, but there are probably better ways to accomplish those tasks using Lightning Experience app APIs instead. In particular, code which sets window.location directly should definitely be revised to integrate with the Lightning Experience navigation stack. Similarly, code that assumes that it has access to the entire environment is in for a rude surprise. It still has access to the Visualforce part of the document, but not the full Lightning Experience app. That will be fine for many apps, but for those that want to be totally in charge, there’s going to be some work for you to do. If your pages use iframes themselves, either with <apex:iframe> or static HTML, being embedded into another iframe could cause some issues. In many cases “turtles all the way down” is fine. Just make sure you do extra testing here. If your pages embed a Canvas app, and especially if you’ve used the Canvas APIs to integrate the app into Salesforce, allocate time for thorough testing as well. Canvas apps use an iframe, and while correctly behaving code should just work, we all know how common perfect code is in the real world. Pages that use Remote Objects and JavaScript remoting work without requiring updates to authentication code. However, if your pages use other Salesforce APIs you might need to adapt your authentication code to make the right cross-domain request, or otherwise adjust to the new environment. All of the above sounds both vague and hard to do but, in truth, the amount of code you’re likely to need to change is small. And again, the details for developers are available in the Visualforce & Lightning Experience module.