- Documentation
- Client events
- onClientBrowserResourceBlocked
Event
onClientBrowserResourceBlocked
The page wanted to load something from a blocked address. Reason: 0 a domain without the player's consent, 1 a blacklist or a local network, 2 a forbidden protocol or address.
Handler
addEventHandler("onClientBrowserResourceBlocked", root, function(url, domain, reason) ... end)Parameters
urlstring- The address.
domainstring- The domain.
reasonint- Reason 0-2.
Source
source is the browser.
Example
addEventHandler("onClientBrowserResourceBlocked", root, function(url, domain, reason)
if reason == 0 then requestBrowserDomains({ domain }) end
end)
See also
requestBrowserDomainsAsks the player for permission to open pages from the given domains. A domain must be on the server's list (browser_domainsinserver-config.json); others are rejected without asking. Consent is remembered.onClientBrowserWhitelistChangeThe player allowed new domains for the browser (afterrequestBrowserDomains).