From 2edb8ac7cb85f3962b99fad87a836eb668839a29 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Mon, 25 Mar 2019 09:57:12 +0000 Subject: [PATCH] better description of PROTOs --- src/lib/js/object.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/js/object.rs b/src/lib/js/object.rs index 83bdaf321e..477ff0b060 100644 --- a/src/lib/js/object.rs +++ b/src/lib/js/object.rs @@ -3,9 +3,11 @@ use crate::js::value::{from_value, to_value, FromValue, ResultValue, ToValue, Va use gc::Gc; use std::collections::HashMap; -/// Made for convenience, usually set on constructors as a key to point to their respective prototype object +/// Static `prototype`, usually set on constructors as a key to point to their respective prototype object. +/// As this string will be used a lot throughout the program, its best being a static global string which will be referenced pub static PROTOTYPE: &'static str = "prototype"; -/// Made for convenience, usually set on instances as a key to point to their respective prototype object +/// Static `__proto__`, usually set on Object instances as a key to point to their respective prototype object. +/// As this string will be used a lot throughout the program, its best being a static global string which will be referenced pub static INSTANCE_PROTOTYPE: &'static str = "__proto__"; pub type ObjectData = HashMap;