Skip to content

Commit db17e9d

Browse files
committed
Add constructor property to Object
1 parent 98e554c commit db17e9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/js-sys/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,13 @@ extern "C" {
18781878
pub fn assign3(target: &Object, source1: &Object, source2: &Object, source3: &Object)
18791879
-> Object;
18801880

1881+
/// The constructor property returns a reference to the Object constructor
1882+
/// function that created the instance object.
1883+
///
1884+
/// [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor)
1885+
#[wasm_bindgen(method, getter)]
1886+
pub fn constructor(this: &Object) -> Function;
1887+
18811888
/// The Object.create() method creates a new object, using an existing
18821889
/// object to provide the newly created object's prototype.
18831890
///

0 commit comments

Comments
 (0)