Create a browser instance within your app
This lesson will focus on creating a browser instance within your LiveCode app. A browser instance can be useful if you want to display web based content within your app (e.g. web pages). This is a dektop only lesson. If you are interested in creating a mobile browser please see the following lesson- http://lessons.runrev.com/m/4069/l/22836-how-do-i-use-the-browser-control
Create a new stack
Add script to button
We now want to add script to the button which will create the browser along with setting its URL.
Edit the script of the button and add the following-
put revBrowserOpenCef(the windowId of this stack, "http://www.livecode.com") into tBrowserID
revBrowserSet tBrowserID, "rect", the rect of graphic "browserPlaceholder"
The above script is creating a CEF browser instance. The windowId of the stack is used to tell LiveCode/your app which window to place the browser object into. As the browser is created at a 0,0,0,0 rect, we set this to the rect of the graphic "browserPlaceholder" as this will show the instance within the area of this graphic.
Please note that the CEF browser is available in versions 6.7+ of LiveCode