mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 09:41:33 +00:00
Merge pull request #322 from belfz/expose-bindings/object-seal
implements Object.seal() binding
This commit is contained in:
@ -431,6 +431,14 @@ extern {
|
||||
#[wasm_bindgen(method, js_name = propertyIsEnumerable)]
|
||||
pub fn property_is_enumerable(this: &Object, property: &JsValue) -> bool;
|
||||
|
||||
/// The Object.seal() method seals an object, preventing new properties
|
||||
/// from being added to it and marking all existing properties as non-configurable.
|
||||
/// Values of present properties can still be changed as long as they are writable.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal
|
||||
#[wasm_bindgen(static_method_of = Object)]
|
||||
pub fn seal(value: &JsValue) -> JsValue;
|
||||
|
||||
/// The toLocaleString() method returns a string representing the object.
|
||||
/// This method is meant to be overridden by derived objects for
|
||||
/// locale-specific purposes.
|
||||
|
Reference in New Issue
Block a user