Show / Hide Table of Contents

Class Browser

Class that wraps MTA browsers

Inheritance
Object
Element
Browser
Inherited Members
Element.element
Element.Root
Element.MTAElement
Element.Type
Element.ID
Element.Exists
Element.ChildCount
Element.Parent
Element.CallPropagationEnabled
Element.SetData(String, Object, Boolean)
Element.GetData(String, Boolean)
Element.TryGetData(String, Object, Boolean)
Element.GetData<T>(String, Boolean)
Element.TryGetData<T>(String, T, Boolean)
Element.Destroy()
Element.GetChild(Int32)
Element.GetChildren(String)
Element.GetByID(String, Int32)
Element.ListenForEvent(String, Boolean, String)
Element.HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Element.OnDestroy
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.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
Type Name Description
Int32 width
Int32 height
Boolean isLocal
Boolean transparent

Properties

| Improve this Doc View Source

CanNavigateBack

Get if a browser can navigate back

Declaration
public bool CanNavigateBack { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

CanNavigateForward

Get if a browser can navigate forward

Declaration
public bool CanNavigateForward { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

DevTools

Set the devtools for this browser

Declaration
public bool DevTools { set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsFocused

Get if this browser is currently focussed on

Declaration
public bool IsFocused { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsLoading

Get if this browser is currently loading a page

Declaration
public bool IsLoading { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

RenderingPaused

Set the rendering of this browser enabled or disabled

Declaration
public bool RenderingPaused { set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Settings

Get browser settings

Declaration
public static dynamic Settings { get; }
Property Value
Type Description
Object
| Improve this Doc View Source

Title

Get the title of this browser

Declaration
public string Title { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Url

Get the current URL of this browser

Declaration
public string Url { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Volume

Set the volume of this browser

Declaration
public float Volume { set; }
Property Value
Type Description
Single

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
Type Description
Boolean
| 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
Type Name Description
String function
IEnumerable<JavascriptVariable> arguments
Returns
Type Description
Boolean
| Improve this Doc View Source

Focus()

Focus on this browser

Declaration
public bool Focus()
Returns
Type Description
Boolean
| 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
Type Description
Object
| 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
Type Name Description
Boolean wasAccepted
String[] domains
| Improve this Doc View Source

InjectMouseDown(MouseButton)

Inject a mousedown event in the browser

Declaration
public bool InjectMouseDown(MouseButton mouseButton)
Parameters
Type Name Description
MouseButton mouseButton
Returns
Type Description
Boolean
| 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
Type Description
Boolean
| Improve this Doc View Source

InjectMouseUp(MouseButton)

Inject a mouseup event in the browser

Declaration
public bool InjectMouseUp(MouseButton mouseButton)
Parameters
Type Name Description
MouseButton mouseButton
Returns
Type Description
Boolean
| 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
Type Description
Boolean
| 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
Type Name Description
String domain
Boolean isURL
Returns
Type Description
Boolean
| 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
Type Name Description
String url
String postData
Boolean urlEncoded
Returns
Type Description
Boolean
| Improve this Doc View Source

ReloadPage()

Reload the page of this browser

Declaration
public bool ReloadPage()
Returns
Type Description
Boolean
| 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
Type Name Description
String domain
Boolean isURL
Returns
Type Description
Boolean
| 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
Type Name Description
String[] domains
Boolean isURL
Returns
Type Description
Boolean
| 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
Type Description
Boolean

Events

| Improve this Doc View Source

OnCreated

Declaration
public event Browser.OnCreatedHandler OnCreated
Event Type
Type Description
Browser.OnCreatedHandler
| Improve this Doc View Source

OnCursorChange

Declaration
public event Browser.OnCursorChangeHandler OnCursorChange
Event Type
Type Description
Browser.OnCursorChangeHandler
| Improve this Doc View Source

OnDocumentReady

Declaration
public event Browser.OnDocumentReadyHandler OnDocumentReady
Event Type
Type Description
Browser.OnDocumentReadyHandler
| Improve this Doc View Source

OnDomainRequestAccepted

Declaration
public static event Action<string> OnDomainRequestAccepted
Event Type
Type Description
Action<String>
| Improve this Doc View Source

OnDomainRequestDenied

Declaration
public static event Action<string> OnDomainRequestDenied
Event Type
Type Description
Action<String>
| Improve this Doc View Source

OnInputFocusChange

Declaration
public event Browser.OnInputFocusChangeHandler OnInputFocusChange
Event Type
Type Description
Browser.OnInputFocusChangeHandler
| Improve this Doc View Source

OnLoadFail

Declaration
public event Browser.OnLoadFailHandler OnLoadFail
Event Type
Type Description
Browser.OnLoadFailHandler
| Improve this Doc View Source

OnLoadStart

Declaration
public event Browser.OnLoadStartHandler OnLoadStart
Event Type
Type Description
Browser.OnLoadStartHandler
| Improve this Doc View Source

OnNavigate

Declaration
public event Browser.OnNavigateHandler OnNavigate
Event Type
Type Description
Browser.OnNavigateHandler
| Improve this Doc View Source

OnPopup

Declaration
public event Browser.OnPopupHandler OnPopup
Event Type
Type Description
Browser.OnPopupHandler
| Improve this Doc View Source

OnResourceBlocked

Declaration
public event Browser.OnResourceBlockedHandler OnResourceBlocked
Event Type
Type Description
Browser.OnResourceBlockedHandler
| Improve this Doc View Source

OnTooltip

Declaration
public event Browser.OnTooltipHandler OnTooltip
Event Type
Type Description
Browser.OnTooltipHandler
| Improve this Doc View Source

OnWhiteListChange

Declaration
public static event Browser.OnWhiteListChangeHandler OnWhiteListChange
Event Type
Type Description
Browser.OnWhiteListChangeHandler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX