Jump to content

[HELP]Browser


Recommended Posts

Posted

Hello all, i am using an example of the wiki, my question is, why if i change the loadBrowserURL it doesnt work?, just work on youtube, thanks!

--In order to render the browser on the full screen, we need to know the dimensions. 
local screenWidth, screenHeight = guiGetScreenSize() 
  
--Let's create a new browser in remote mode. 
local window = guiCreateWindow(0, 0, screenWidth, screenHeight, "Webbrowser", false) 
local browser = guiCreateBrowser(0, 0, 800, 600, false, false, false, window) 
  
-- The event onClientBrowserCreated will be triggered, after the browser has been initialized. 
-- After this event has been triggered, we will be able to load our URL 
local theBrowser = guiGetBrowser(browser) -- Get the browser element from gui-browser 
addEventHandler("onClientBrowserCreated", theBrowser,  
    function() 
        -- After the browser has been initialized, we can load [url=https://www.youtube.com]www.youtube.com[/url] 
        loadBrowserURL(source, "https://www.youtube.com")--Here, when i change the url to [url=http://www.google.com]http://www.google.com[/url] it doesnt work 
    end 
) 

Posted

You habe to request it first, but for example facebook uses tons of subdomains and other domains so for that you should use onClientBrowserResourceBlocked.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...