1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// devela::lang::prog::ffi::js
//
//! <a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a> interfacing.
//!
//! # Overview
//!
//! - JavaScript is a high-level, dynamically typed language
//! with an **event-driven, single-threaded** execution model.
//! - It primarily runs in **web browsers**, interacting with the DOM,
//! but is also used in other environments.
//! - Blocking the main thread prevents UI updates and user interactions,
//! requiring **asynchronous programming** via callbacks, promises, or `async/await`.
//!
//! # Syntax Basics
//!
//! ```js
//! // Variables
//! let x;
//! x = 1; // Integer
//! x = 0.1; // Floating-point number
//! x = "hello"; // String (double quotes)
//! x = 'hello'; // String (single quotes)
//! x = true; // Boolean
//! x = null; // Explicit "no value"
//! x = undefined; // Uninitialized or missing value
//!
//! // Objects (key-value pairs)
//! let obj = {
//! field1: "string",
//! field2: 5
//! };
//!
//! // Arrays (heterogeneous lists)
//! let arr = [1, "two", 3.0, false];
//! ```
//!
//! # Concurrency
//!
//! - JavaScript runs in a **single-threaded** environment.
//! - [`WebWorker`][crate::WebWorker]s allow parallel execution but **cannot block** execution.
//! - Delays can be simulated using `setTimeout()` or `Atomics.wait()` in shared memory.
//!
//! While Web Workers enable concurrency, they communicate via message passing
//! and do not share memory except through `SharedArrayBuffer`.
// JsConsole
// Js
// js_number, js_int32, js_unit32, js_bool…
// JsTextMetrics, JsTextMetricsFull
// JsInstant, JsTimeout
// JsInstant, JsTimeout
// _js_doc!, _js_extern!, js_method_str_alloc!
// WIPZONE
// mod error; // JsError
// mod object; // JsObject
cratestructural_mods!