Skip to content

Commit

Permalink
Last few changes in builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Dec 1, 2022
1 parent 8ee0eb0 commit f16d5fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions boa_engine/src/builtins/mod.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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
///
Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/builtins/weak/weak_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f16d5fc

Please sign in to comment.