Class Browser
Class that wraps MTA browsers
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.Browser)]
public class Browser : Element
Constructors
|
Improve this Doc
View Source
Browser(Int32, Int32, Boolean, Boolean)
Create a browser from the createBrowser parameters
Declaration
public Browser(int width, int height, bool isLocal, bool transparent = false)
Parameters
Properties
|
Improve this Doc
View Source
CanNavigateBack
Get if a browser can navigate back
Declaration
public bool CanNavigateBack { get; }
Property Value
|
Improve this Doc
View Source
CanNavigateForward
Get if a browser can navigate forward
Declaration
public bool CanNavigateForward { get; }
Property Value
|
Improve this Doc
View Source
Set the devtools for this browser
Declaration
public bool DevTools { set; }
Property Value
|
Improve this Doc
View Source
IsFocused
Get if this browser is currently focussed on
Declaration
public bool IsFocused { get; }
Property Value
|
Improve this Doc
View Source
IsLoading
Get if this browser is currently loading a page
Declaration
public bool IsLoading { get; }
Property Value
|
Improve this Doc
View Source
RenderingPaused
Set the rendering of this browser enabled or disabled
Declaration
public bool RenderingPaused { set; }
Property Value
|
Improve this Doc
View Source
Settings
Declaration
public static dynamic Settings { get; }
Property Value
|
Improve this Doc
View Source
Title
Get the title of this browser
Declaration
public string Title { get; }
Property Value
|
Improve this Doc
View Source
Url
Get the current URL of this browser
Declaration
public string Url { get; }
Property Value
|
Improve this Doc
View Source
Volume
Set the volume of this browser
Declaration
public float Volume { set; }
Property Value
Methods
|
Improve this Doc
View Source
ExecuteJavascript(String)
Execute some javascript code
Declaration
public bool ExecuteJavascript(string javascript)
Parameters
Type |
Name |
Description |
String |
javascript |
|
Returns
|
Improve this Doc
View Source
ExecuteJavascript(String, IEnumerable<JavascriptVariable>)
Execute a javascript function using formatted js arguments
Declaration
public bool ExecuteJavascript(string function, IEnumerable<JavascriptVariable> arguments)
Parameters
Returns
|
Improve this Doc
View Source
Focus()
Declaration
Returns
|
Improve this Doc
View Source
GetProperty(String)
Get a specific browser property
Declaration
public dynamic GetProperty(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Returns
|
Improve this Doc
View Source
HandleDomainRequest(Boolean, String[])
Handler that is triggered after a domain request was done
Declaration
public static void HandleDomainRequest(bool wasAccepted, string[] domains)
Parameters
|
Improve this Doc
View Source
Inject a mousedown event in the browser
Declaration
public bool InjectMouseDown(MouseButton mouseButton)
Parameters
Returns
|
Improve this Doc
View Source
InjectMouseMove(Vector2)
Inject a mousemove event to a specific position
Declaration
public bool InjectMouseMove(Vector2 position)
Parameters
Type |
Name |
Description |
Vector2 |
position |
|
Returns
|
Improve this Doc
View Source
Inject a mouseup event in the browser
Declaration
public bool InjectMouseUp(MouseButton mouseButton)
Parameters
Returns
|
Improve this Doc
View Source
InjectMouseWheel(Int32, Int32)
Inject a mouse scroll event
Declaration
public bool InjectMouseWheel(int vertical, int horizontal)
Parameters
Type |
Name |
Description |
Int32 |
vertical |
|
Int32 |
horizontal |
|
Returns
|
Improve this Doc
View Source
IsDomainBlocked(String, Boolean)
Check if a specific domain is blocked
Declaration
public static bool IsDomainBlocked(string domain, bool isURL = false)
Parameters
Returns
|
Improve this Doc
View Source
LoadUrl(String, String, Boolean)
Load a specific browser URL
Declaration
public bool LoadUrl(string url, string postData = null, bool urlEncoded = true)
Parameters
Returns
|
Improve this Doc
View Source
ReloadPage()
Reload the page of this browser
Declaration
Returns
|
Improve this Doc
View Source
RequestDomain(String, Boolean)
Opens a request window in order to accept a remote URL
Declaration
public static bool RequestDomain(string domain, bool isURL = false)
Parameters
Returns
|
Improve this Doc
View Source
RequestDomains(String[], Boolean)
Opens a request window in order to accept the requested remote URLs
Declaration
public static bool RequestDomains(string[] domains, bool isURL = false)
Parameters
Returns
|
Improve this Doc
View Source
Resize(Vector2)
Resize the browser to specific dimensions
Declaration
public bool Resize(Vector2 dimensions)
Parameters
Type |
Name |
Description |
Vector2 |
dimensions |
|
Returns
Events
|
Improve this Doc
View Source
OnCreated
Declaration
public event Browser.OnCreatedHandler OnCreated
Event Type
|
Improve this Doc
View Source
OnCursorChange
Declaration
public event Browser.OnCursorChangeHandler OnCursorChange
Event Type
|
Improve this Doc
View Source
OnDocumentReady
Declaration
public event Browser.OnDocumentReadyHandler OnDocumentReady
Event Type
|
Improve this Doc
View Source
OnDomainRequestAccepted
Declaration
public static event Action<string> OnDomainRequestAccepted
Event Type
|
Improve this Doc
View Source
OnDomainRequestDenied
Declaration
public static event Action<string> OnDomainRequestDenied
Event Type
|
Improve this Doc
View Source
Declaration
public event Browser.OnInputFocusChangeHandler OnInputFocusChange
Event Type
|
Improve this Doc
View Source
OnLoadFail
Declaration
public event Browser.OnLoadFailHandler OnLoadFail
Event Type
|
Improve this Doc
View Source
OnLoadStart
Declaration
public event Browser.OnLoadStartHandler OnLoadStart
Event Type
|
Improve this Doc
View Source
OnNavigate
Declaration
public event Browser.OnNavigateHandler OnNavigate
Event Type
|
Improve this Doc
View Source
Declaration
public event Browser.OnPopupHandler OnPopup
Event Type
|
Improve this Doc
View Source
OnResourceBlocked
Declaration
public event Browser.OnResourceBlockedHandler OnResourceBlocked
Event Type
|
Improve this Doc
View Source
Declaration
public event Browser.OnTooltipHandler OnTooltip
Event Type
|
Improve this Doc
View Source
OnWhiteListChange
Declaration
public static event Browser.OnWhiteListChangeHandler OnWhiteListChange
Event Type