| Modifier and Type | Class and Description |
|---|---|
static interface |
JSContext.Block_exceptionHandler_ret |
static interface |
JSContext.Block_setExceptionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
JSContext(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static JSContext |
alloc() |
static JSContext |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static JSContext |
contextWithJSGlobalContextRef(JSGlobalContextRef jsGlobalContextRef)
Create a JSContext, wrapping its C API counterpart.
|
static NSArray<?> |
currentArguments()
Get the arguments to the current callback.
|
static JSValue |
currentCallee()
Get the JavaScript function that is currently executing.
|
static JSContext |
currentContext()
[@methodgroup] Callback Accessors
|
static JSValue |
currentThis()
Get the
this value of the currently executing method. |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
JSValue |
evaluateScript(java.lang.String script)
[@methodgroup] Evaluating Scripts
|
JSValue |
evaluateScriptWithSourceURL(java.lang.String script,
NSURL sourceURL)
Evaluate a string of JavaScript code, with a URL for the script's source file.
|
JSValue |
exception()
[@property]
|
JSContext.Block_exceptionHandler_ret |
exceptionHandler()
[@property]
|
JSValue |
globalObject()
[@property]
|
static long |
hash_static() |
JSContext |
init()
[@methodgroup] Creating New JSContexts
|
JSContext |
initWithVirtualMachine(JSVirtualMachine virtualMachine)
Create a JSContext in the specified virtual machine.
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
JSGlobalContextRef |
JSGlobalContextRef()
[@property]
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
java.lang.String |
name()
[@property]
|
static JSContext |
new_objc() |
JSValue |
objectForKeyedSubscript(java.lang.Object key)
Get a particular property on the global object.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setException(JSValue value)
[@property]
|
void |
setExceptionHandler(JSContext.Block_setExceptionHandler value)
[@property]
|
void |
setName(java.lang.String value)
[@property]
|
void |
setObjectForKeyedSubscript(java.lang.Object object,
NSObject key)
Set a particular property on the global object.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static long |
version_static() |
JSVirtualMachine |
virtualMachine()
[@property]
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static JSContext alloc()
public static JSContext allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static JSContext contextWithJSGlobalContextRef(JSGlobalContextRef jsGlobalContextRef)
public static NSArray<?> currentArguments()
This method may be called from within an Objective-C block or method invoked as a callback from JavaScript to retrieve the callback's arguments, objects in the returned array are instances of JSValue. Outside of a callback from JavaScript this method will return nil.
public static JSValue currentCallee()
This method may be called from within an Objective-C block or method invoked as a callback from JavaScript to retrieve the callback's context. Outside of a callback from JavaScript this method will return nil.
public static JSContext currentContext()
Get the JSContext that is currently executing.
This method may be called from within an Objective-C block or method invoked as a callback from JavaScript to retrieve the callback's context. Outside of a callback from JavaScript this method will return nil.
public static JSValue currentThis()
this value of the currently executing method.
This method may be called from within an Objective-C block or method invoked as a callback from JavaScript to retrieve the callback's this value. Outside of a callback from JavaScript this method will return nil.
this value or nil if there isn't one.public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static JSContext new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public JSGlobalContextRef JSGlobalContextRef()
Get the C API counterpart wrapped by a JSContext.
public JSValue evaluateScript(java.lang.String script)
Evaluate a string of JavaScript code.
script - A string containing the JavaScript code to evaluate.public JSValue evaluateScriptWithSourceURL(java.lang.String script, NSURL sourceURL)
script - A string containing the JavaScript code to evaluate.sourceURL - A URL for the script's source file. Used by debuggers and when reporting exceptions. This parameter is informative only: it does not change the behavior of the script.public JSValue exception()
The exception property may be used to throw an exception to JavaScript.
Before a callback is made from JavaScript to an Objective-C block or method, the prior value of the exception property will be preserved and the property will be set to nil. After the callback has completed the new value of the exception property will be read, and prior value restored. If the new value of exception is not nil, the callback will result in that value being thrown.
This property may also be used to check for uncaught exceptions arising from
API function calls (since the default behaviour of exceptionHandler is to
assign an uncaught exception to this property).
public JSContext.Block_exceptionHandler_ret exceptionHandler()
If a call to an API function results in an uncaught JavaScript exception, the
exceptionHandler block will be invoked. The default implementation for the
exception handler will store the exception to the exception property on
context. As a consequence the default behaviour is for uncaught exceptions
occurring within a callback from JavaScript to be rethrown upon return.
Setting this value to nil will cause all exceptions occurring
within a callback from JavaScript to be silently caught.
public JSValue globalObject()
Get the global object of the context.
This method retrieves the global object of the JavaScript execution context. Instances of JSContext originating from WebKit will return a reference to the WindowProxy object.
public JSContext init()
Create a JSContext.
public JSContext initWithVirtualMachine(JSVirtualMachine virtualMachine)
virtualMachine - The JSVirtualMachine in which the context will be created.public java.lang.String name()
Name of the JSContext. Exposed when remote debugging the context.
public JSValue objectForKeyedSubscript(java.lang.Object key)
public void setException(JSValue value)
The exception property may be used to throw an exception to JavaScript.
Before a callback is made from JavaScript to an Objective-C block or method, the prior value of the exception property will be preserved and the property will be set to nil. After the callback has completed the new value of the exception property will be read, and prior value restored. If the new value of exception is not nil, the callback will result in that value being thrown.
This property may also be used to check for uncaught exceptions arising from
API function calls (since the default behaviour of exceptionHandler is to
assign an uncaught exception to this property).
public void setExceptionHandler(JSContext.Block_setExceptionHandler value)
If a call to an API function results in an uncaught JavaScript exception, the
exceptionHandler block will be invoked. The default implementation for the
exception handler will store the exception to the exception property on
context. As a consequence the default behaviour is for uncaught exceptions
occurring within a callback from JavaScript to be rethrown upon return.
Setting this value to nil will cause all exceptions occurring
within a callback from JavaScript to be silently caught.
public void setName(java.lang.String value)
Name of the JSContext. Exposed when remote debugging the context.
public void setObjectForKeyedSubscript(java.lang.Object object,
NSObject key)
public JSVirtualMachine virtualMachine()
All instances of JSContext are associated with a JSVirtualMachine.