From f16d5fc8888dfb5586ed1c3be2956bbaf90bc9ad Mon Sep 17 00:00:00 2001 From: nekevss Date: Wed, 30 Nov 2022 20:58:57 -0500 Subject: [PATCH] Last few changes in builtins --- boa_engine/src/builtins/mod.rs | 8 +++++--- boa_engine/src/builtins/weak/weak_ref.rs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/boa_engine/src/builtins/mod.rs b/boa_engine/src/builtins/mod.rs index c86f5913606..5c1c215cdb6 100644 --- a/boa_engine/src/builtins/mod.rs +++ b/boa_engine/src/builtins/mod.rs @@ -1,4 +1,6 @@ //! Boa's ECMAScript built-in object implementations, e.g. Object, String, Math, Array, etc. +//! +//! This module also contains a JavaScript Console implementation. pub mod array; pub mod array_buffer; @@ -91,12 +93,12 @@ use crate::{ /// Trait representing a global built-in object such as `Math`, `Object` or `String`. /// -/// This trait must be implemented for any global built-in accessible from JavaScript. +/// This trait must be implemented for any global built-in accessible from ECMAScript/JavaScript. pub(crate) trait BuiltIn { /// Binding name of the built-in inside the global object. /// /// E.g. If you want access the properties of a `Complex` built-in with the name `Cplx` you must - /// assign `"Cplx"` to this constant, making any property inside it accessible from Javascript + /// assign `"Cplx"` to this constant, making any property inside it accessible from ECMAScript/JavaScript /// as `Cplx.prop` const NAME: &'static str; @@ -108,7 +110,7 @@ pub(crate) trait BuiltIn { /// Initialization code for the built-in. /// /// This is where the methods, properties, static methods and the constructor of a built-in must - /// be initialized to be accessible from Javascript. + /// be initialized to be accessible from ECMAScript/JavaScript. /// /// # Note /// diff --git a/boa_engine/src/builtins/weak/weak_ref.rs b/boa_engine/src/builtins/weak/weak_ref.rs index b5328a007a9..ba826a36f7b 100644 --- a/boa_engine/src/builtins/weak/weak_ref.rs +++ b/boa_engine/src/builtins/weak/weak_ref.rs @@ -13,7 +13,7 @@ use crate::{ Context, JsNativeError, JsResult, JsValue, }; -/// Boa's implementation of JavaScript's `WeakRef` builtin object. +/// Boa's implementation of ECMAScript's `WeakRef` builtin object. /// /// The `WeakRef` is a way to refer to a target object without rooting the target and thus preserving it in garbage /// collection. A `WeakRef` will allow the user to dereference the target as long as the target object has not been