SetBrowserRenderingPaused: Difference between revisions
Jump to navigation
Jump to search
The.Killer (talk | contribs) No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Client function}} | ||
{{New feature/item|3.0150|1.5|| | {{New feature/item|3.0150|1.5|| | ||
This function sets the rendering state of a browser. | This function sets the rendering state of a browser. | ||
Line 9: | Line 9: | ||
bool setBrowserRenderingPaused ( browser webBrowser, bool paused ) | bool setBrowserRenderingPaused ( browser webBrowser, bool paused ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ | {{OOP||[[browser]]:setRenderingPaused}} | ||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 20:17, 15 September 2015
This function sets the rendering state of a browser.
Syntax
bool setBrowserRenderingPaused ( browser webBrowser, bool paused )
OOP Syntax Help! I don't understand this!
- Method: browser:setRenderingPaused(...)
Required Arguments
- webBrowser: The browser
- paused: true to pause rendering, false to continue
Returns
Returns true if the state was successfully changed
Example
--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 www.youtube.com loadBrowserURL(source, "http://www.youtube.com") end ) addCommandHandler ("pause", -- Add command named 'pause' function (player, command, value) if (value) then -- checking for a value setBrowserRenderingPaused (theBrowser, value) else -- if there is no value outputChatBox ("You must enter a value.", player) end end )
See also
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- isBrowserRenderingPaused
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools