Platforms to show: All Mac Windows Linux Cross-Platform

Back to JSContextMBS class.

JSContextMBS.globalObject as JSObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property JavaScript MBS MacFrameworks Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the global object of a JavaScript execution context.
Example
dim c as new JSContextMBS

dim v as JSObjectMBS = c.globalObject
dim e as JSValueMBS

v.SetProperty "Hello", c.valueWithString("World"), e
v.SetProperty "Value", c.valueWithDouble(5), e

MsgBox c.globalObject.JSONString

(Read only property)

Some examples using this property:

JSContextMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property JavaScript MBS MacFrameworks Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal object reference.

(Read and Write property)

JSContextMBS.Name as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property JavaScript MBS MacFrameworks Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name.
Example
dim c as new JSContextMBS

c.Name = "Hello"
MsgBox c.Name

Requires Mac OS X 10.10 and newer.
(Read and Write property)

JSContextMBS.Tag as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property JavaScript MBS MacFrameworks Plugin 15.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The tag value.

You can store anything here and as long as the JSContext object exists, this value is kept referenced.
(Read and Write property)

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...