Class
JSOneshotClosure
public class JSOneshotClosure: JSObject, JSClosureProtocol
JSOneshotClosure
is a JavaScript function that can be called only once. This class can be used
for optimized memory management when compared to the common JSClosure
.
Relationships
Superclass
JSObject
JSObject
represents an object in JavaScript and supports dynamic member lookup. Any member access likeobject.foo
will dynamically request the JavaScript and Swift runtime bridge library for a member with the specified name in this object.
Conforms To
JSClosureProtocol
JSClosureProtocol
wraps Swift closure objects for use in JavaScript. Conforming types are responsible for managing the lifetime of the closure they wrap, but can delegate that task to the user by requiring an explicitrelease()
call.
Initializers
Methods
release()
public func release()
Release this function resource.
After calling release
, calling this function from JavaScript will fail.