Liking cljdoc? Tell your friends :D

js.Proxy

The Proxy object is used to define custom behavior for fundamental (e.g. property lookup, assignment, enumeration, function invocation,

The Proxy object is used to define custom behavior for fundamental
(e.g. property lookup, assignment, enumeration, function invocation,
raw docstring

applycljs

(apply this & args)

Method.

The handler.apply() method is a trap for a function call.

var p = new Proxy(target, { apply: function(target, thisArg, argumentsList) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/apply

Method.

The handler.apply() method is a trap for a function call.

`var p = new Proxy(target, {
apply: function(target, thisArg, argumentsList) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/apply`
sourceraw docstring

constructcljs

(construct this & args)

Method.

The handler.construct() method is a trap for the new operator. order for the new operation to be valid on the resulting Proxy the target used to initialize the proxy must itself have a [[Construct]] method (i.e. new target must be valid).

var p = new Proxy(target, { construct: function(target, argumentsList, newTarget) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/construct

Method.

The handler.construct() method is a trap for the `new` operator.
order for the new operation to be valid on the resulting Proxy
the target used to initialize the proxy must itself have a [[Construct]]
method (i.e. new target must be valid).

`var p = new Proxy(target, {
construct: function(target, argumentsList, newTarget) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/construct`
sourceraw docstring

define-propertycljs

(define-property this & args)

Method.

The handler.defineProperty() method is a trap for Object.defineProperty().

var p = new Proxy(target, { defineProperty: function(target, property, descriptor) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/defineProperty

Method.

The handler.defineProperty() method is a trap for `Object.defineProperty()`.

`var p = new Proxy(target, {
defineProperty: function(target, property, descriptor) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/defineProperty`
sourceraw docstring

delete-propertycljs

(delete-property this & args)

Method.

The handler.deleteProperty() method is a trap for the delete

var p = new Proxy(target, { deleteProperty: function(target, property) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/deleteProperty

Method.

The handler.deleteProperty() method is a trap for the `delete`

`var p = new Proxy(target, {
deleteProperty: function(target, property) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/deleteProperty`
sourceraw docstring

enumeratecljs

(enumerate this & args)

Method.

[Obsolute]

The handler.enumerate() method used to be a trap for for...in but has been removed from the ECMAScript standard in ES2016 and deprecated in browsers.

var p = new Proxy(target, { enumerate(target) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/enumerate

Method.

[Obsolute]

The handler.enumerate() method used to be a trap for `for...in`
but has been removed from the ECMAScript standard in ES2016 and
deprecated in browsers.

`var p = new Proxy(target, {
enumerate(target) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/enumerate`
sourceraw docstring

getcljs

(get this & args)

Method.

The handler.get() method is a trap for getting a property value.

var p = new Proxy(target, { get: function(target, property, receiver) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/get

Method.

The handler.get() method is a trap for getting a property value.

`var p = new Proxy(target, {
get: function(target, property, receiver) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/get`
sourceraw docstring

get-own-property-descriptorcljs

(get-own-property-descriptor this & args)

Method.

The handler.getOwnPropertyDescriptor() method is a trap for Object.getOwnPropertyDescriptor().

var p = new Proxy(target, { getOwnPropertyDescriptor: function(target, prop) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor

Method.

The handler.getOwnPropertyDescriptor() method is a trap for `Object.getOwnPropertyDescriptor()`.

`var p = new Proxy(target, {
getOwnPropertyDescriptor: function(target, prop) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getOwnPropertyDescriptor`
sourceraw docstring

get-prototype-ofcljs

(get-prototype-of this & args)

Method.

The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]] method.

var p = new Proxy(obj, { getPrototypeOf(target) { ... } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getPrototypeOf

Method.

The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]]
method.

`var p = new Proxy(obj, {
getPrototypeOf(target) {
...
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getPrototypeOf`
sourceraw docstring

hascljs

(has this & args)

Method.

The handler.has() method is a trap for the in operator.

var p = new Proxy(target, { has: function(target, prop) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/has

Method.

The handler.has() method is a trap for the `in` operator.

`var p = new Proxy(target, {
has: function(target, prop) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/has`
sourceraw docstring

is-extensiblecljs

(is-extensible this & args)

Method.

The handler.isExtensible() method is a trap for Object.isExtensible().

var p = new Proxy(target, { isExtensible: function(target) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/isExtensible

Method.

The handler.isExtensible() method is a trap for `Object.isExtensible()`.

`var p = new Proxy(target, {
isExtensible: function(target) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/isExtensible`
sourceraw docstring

own-keyscljs

(own-keys this & args)

Method.

The handler.ownKeys() method is a trap for Reflect.ownKeys().

var p = new Proxy(target, { ownKeys: function(target) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys

Method.

The handler.ownKeys() method is a trap for `Reflect.ownKeys()`.

`var p = new Proxy(target, {
ownKeys: function(target) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys`
sourceraw docstring

prevent-extensionscljs

(prevent-extensions this & args)

Method.

The handler.preventExtensions() method is a trap for Object.preventExtensions().

var p = new Proxy(target, { preventExtensions: function(target) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/preventExtensions

Method.

The handler.preventExtensions() method is a trap for `Object.preventExtensions()`.

`var p = new Proxy(target, {
preventExtensions: function(target) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/preventExtensions`
sourceraw docstring

revocablecljs

(revocable this target handler)

Method.

The Proxy.revocable() method is used to create a revocable js.Proxy

Proxy.revocable(target, handler);

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable

Method.

The Proxy.revocable() method is used to create a revocable `js.Proxy`

`Proxy.revocable(target, handler);`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable`
sourceraw docstring

setcljs

(set this & args)

Method.

The handler.set() method is a trap for setting a property value.

var p = new Proxy(target, { set: function(target, property, value, receiver) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/set

Method.

The handler.set() method is a trap for setting a property value.

`var p = new Proxy(target, {
set: function(target, property, value, receiver) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/set`
sourceraw docstring

set-prototype-ofcljs

(set-prototype-of this & args)

Method.

The handler.setPrototypeOf() method is a trap for Object.setPrototypeOf().

var p = new Proxy(target, { setPrototypeOf: function(target, prototype) { } });

See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/setPrototypeOf

Method.

The handler.setPrototypeOf() method is a trap for `Object.setPrototypeOf()`.

`var p = new Proxy(target, {
setPrototypeOf: function(target, prototype) {
}
});`

See also: `https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/setPrototypeOf`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close