From 138f0ca880f9aa40278c9f426f68fdf8e3078159 Mon Sep 17 00:00:00 2001 From: HalidOdat Date: Sun, 12 Apr 2020 22:53:32 +0200 Subject: [PATCH] Added some more documentation to builtins/console --- boa/src/builtins/console.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/boa/src/builtins/console.rs b/boa/src/builtins/console.rs index 93a17a84ba..8081ee22f1 100644 --- a/boa/src/builtins/console.rs +++ b/boa/src/builtins/console.rs @@ -1,4 +1,15 @@ //! This module implements the global `console` object. +//! +//! The `console` object can be accessed from any global object. +//! +//! The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. +//! +//! More information: +//! - [MDN documentation][mdn] +//! - [WHATWG `console` specification][spec] +//! +//! [spec]: https://console.spec.whatwg.org/ +//! [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/Console #![allow(clippy::print_stdout)] @@ -15,8 +26,8 @@ use std::{iter::FromIterator, ops::Deref}; /// This `console` method prints the javascript values to stdout. /// /// More information: -/// - [Whatwg reference][spec] /// - [MDN documentation][mdn] +/// - [WHATWG `log` specification][spec] /// /// [spec]: https://console.spec.whatwg.org/#log /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/Console/log @@ -34,8 +45,8 @@ pub fn log(_: &Value, args: &[Value], _: &mut Interpreter) -> ResultValue { /// This `console` method prints the javascript values to stderr. /// /// More information: -/// - [Whatwg reference][spec] /// - [MDN documentation][mdn] +/// - [WHATWG `error` specification][spec] /// /// [spec]: https://console.spec.whatwg.org/#error /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/Console/error