OnClientBrowserNavigate: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Removed old issue)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client event}}
{{Client event}}
{{Needs Example}}
{{New feature/item|3.0150|1.5||
{{New feature/item|3.0150|1.5||
The event is executed when the browser loads a new page. Do not use [[loadBrowserURL]] in the attached function.
The event is executed when the browser loads a new page. Do not use [[loadBrowserURL]] in the attached function.
Line 10: Line 9:
string targetURL, bool isBlocked, bool isMainFrame
string targetURL, bool isBlocked, bool isMainFrame
</syntaxhighlight>
</syntaxhighlight>
*'''targetURL:''' the page the browser loaded.
* '''targetURL:''' the page the browser loaded.
*'''isBlocked:''' if the [[browser]] was created with '''isLocal''' set to '''true''', and the browser tried to load a remote page, this would be set to '''true''' (and vice-versa).
* '''isBlocked:''' if the [[browser]] was created with '''isLocal''' set to '''true''', and the browser tried to load a remote page, this would be set to '''true''' (and vice-versa).
* {{New feature/item|3.0160|1.6|7888|'''isMainFrame:''' a [[boolean]] representing whether the entire page (main frame) was loaded or an ''<iframe>'' inside the page was loaded.}}
{{New items|3.0160|1.6|
* '''isMainFrame:''' a [[boolean]] representing whether the entire page (main frame) was loaded or an ''<iframe>'' inside the page was loaded.
|7888}}


==Source==
==Source==
Line 18: Line 19:


==Example==  
==Example==  
TODO
{{Example}}
 
== Issues ==
{{Issues|
{{Issue|9173|onClientBrowserNavigate is triggered for <iframe> elements}}
}}


[[pl:onClientBrowserNavigate]]
[[pl:onClientBrowserNavigate]]

Latest revision as of 10:32, 30 January 2022

The event is executed when the browser loads a new page. Do not use loadBrowserURL in the attached function.

Parameters

string targetURL, bool isBlocked, bool isMainFrame
  • targetURL: the page the browser loaded.
  • isBlocked: if the browser was created with isLocal set to true, and the browser tried to load a remote page, this would be set to true (and vice-versa).
  • isMainFrame: a boolean representing whether the entire page (main frame) was loaded or an <iframe> inside the page was loaded.

Source

The browser element.

Example

Accessories-text-editor.png Script Example Missing Event OnClientBrowserNavigate needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.
-- TODO

See Also