File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,14 @@ extern "C" {
233
233
#[ doc( hidden) ]
234
234
pub fn js_console_log ( s : & str ) ;
235
235
236
+ #[ wasm_bindgen( js_namespace = console, js_name = error) ]
237
+ #[ doc( hidden) ]
238
+ pub fn js_console_error ( s : & str ) ;
239
+
240
+ #[ wasm_bindgen( js_namespace = console, js_name = warn) ]
241
+ #[ doc( hidden) ]
242
+ pub fn js_console_warn ( s : & str ) ;
243
+
236
244
// General-purpose conversion into a `String`.
237
245
#[ wasm_bindgen( js_name = String ) ]
238
246
fn stringify ( val : & JsValue ) -> String ;
@@ -243,6 +251,16 @@ pub fn log(args: &fmt::Arguments) {
243
251
js_console_log ( & args. to_string ( ) ) ;
244
252
}
245
253
254
+ /// Internal implementation detail of the `console_warn!` macro.
255
+ pub fn log_warn ( args : & fmt:: Arguments ) {
256
+ js_console_warn ( & args. to_string ( ) ) ;
257
+ }
258
+
259
+ /// Internal implementation detail of the `console_error!` macro.
260
+ pub fn log_error ( args : & fmt:: Arguments ) {
261
+ js_console_error ( & args. to_string ( ) ) ;
262
+ }
263
+
246
264
#[ wasm_bindgen( js_class = WasmBindgenTestContext ) ]
247
265
impl Context {
248
266
/// Creates a new context ready to run tests.
You can’t perform that action at this time.
0 commit comments