You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A **browser** is an element representing a CEF browser instance, created with [createBrowser](/reference/createBrowser/) or [guiCreateBrowser](/reference/guiCreateBrowser/). This element also simultaneously represents the browser’s [texture](/reference/texture/), so it can be used as a texture, e.g. for rendering with [dxDrawImage](/reference/dxDrawImage/).
description: This function creates a new web [[browser]] element.
4
+
notes:
5
+
- type: tip
6
+
content: You can also enable CEF development tools using [[toggleBrowserDevTools]].
7
+
- type: info
8
+
content: For local files as url please read [Local Scheme Handler](/reference/Local_Scheme_Handler/).
9
+
oop:
10
+
element: browser
11
+
constructorclass: browser
12
+
parameters:
13
+
- name: width
14
+
type: int
15
+
description: The browser's native width. This should be greater than or equal to 1.
16
+
- name: height
17
+
type: int
18
+
description: The browser's native height. This should be greater than or equal to 1.
19
+
- name: isLocal
20
+
type: bool
21
+
description: Sets whether the browser can only show local content or content from the internet (see examples for more information).
22
+
- name: transparent
23
+
type: bool
24
+
description: true if you want the browser transparent, false for opaque.
25
+
default: 'false'
26
+
returns:
27
+
values:
28
+
- type: element|false
29
+
name: new browser
30
+
description: Returns a [[texture]] of the [[browser]] if it was created successfully, false otherwise. Returns also false, if the user disabled remote pages and isLocal was set to false.
31
+
examples:
32
+
- path: examples/createBrowser-1.lua
33
+
description: This example shows you how to create a fullscreen web browser (showing a local html file) without input-handling.
34
+
- path: examples/createBrowser_OOP-1.lua
35
+
description: This example shows you how to create a fullscreen web browser (showing a local html file) without input-handling.
36
+
oop: true
37
+
- path: examples/createBrowser-2.lua
38
+
description: |
39
+
This example shows you how to create a fullscreen web browser (showing youtube.com) without input-handling.
40
+
Remember, that youtube.com is on the global whitelist. If you want to load a domain/page that is not on the global whitelist, you have to request it with [[requestBrowserDomains]].
0 commit comments