Module org.htmlunit.corejs
Package org.htmlunit.corejs.javascript
Interface JSCodeResume<T extends ScriptOrFn<T>>
- All Known Implementing Classes:
ACompilerData,CompilerData,JSCode,JSCodeResume.NullResume
public interface JSCodeResume<T extends ScriptOrFn<T>>
This interface represent a thing which can be executed in JavaScript, which could be a generator,
or potentially in future an async function.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classJSCodeResume.NullResume<T extends ScriptOrFn<T>> -
Field Summary
Fields -
Method Summary
-
Field Details
-
NULL_RESUMABLE
-
-
Method Details
-
resume
Object resume(Context cx, T executableObject, Object state, VarScope scope, int operation, Object value) Resuem execution of the code represented by this object.- Parameters:
cx- should be context in which the call is being madeexecutableObject- should be function or script which owns this code.state- should be the state object created at some previous point when execution was yielded.scope- should be the scope in which the code will be executed.operation- should be one of the constants defined onNativeGeneratorand represents the operation being performed.value- represents the value being passed into the generator (see https://tc39.es/ecma262/#sec-generatorresume for details).- Returns:
- the result of executing the code.
-