diff --git a/docs/about.html b/docs/about.html index db5ef5e..66a8c5f 100644 --- a/docs/about.html +++ b/docs/about.html @@ -2,10 +2,25 @@ -MuJS: about +About MuJS + +
+

About MuJS

+
+ + + +
+

What is MuJS?

@@ -80,4 +95,12 @@ The default build is sandboxed with very restricted access to resources. MuJS is free open source software distributed under the ISC license. +

+ + + + diff --git a/docs/artifex-logo.png b/docs/artifex-logo.png new file mode 100755 index 0000000..af610a0 Binary files /dev/null and b/docs/artifex-logo.png differ diff --git a/docs/examples.html b/docs/examples.html index a40aae0..fb77cac 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -2,11 +2,24 @@ -MuJS: examples +MuJS Examples + +

MuJS Examples

+
+ + + +

A stand-alone interpreter

@@ -103,6 +116,7 @@ static int call_callback(js_State *J, const char *arg1, int arg2) return result; } +

Callbacks from C to JS

@@ -198,4 +212,12 @@ void initfile(js_State *J) } +
+ + + + diff --git a/docs/reference.html b/docs/reference.html index 341a536..0bcbffa 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -2,11 +2,24 @@ -MuJS: reference manual +MuJS Reference Manual + +

MuJS Reference Manual

+
+ + + +

Introduction

@@ -171,6 +184,18 @@ js_Panic js_atpanic(js_State *J, js_Panic panic); Set a new panic function, and return the old one. +

Report

+ +
+typedef void (*js_Report)(js_State *J, const char *message);
+
+void js_setreport(js_State *J, js_Report report);
+
+ +

+Set a callback function for reporting various warnings +and garbage collection statistics. +

Garbage collection

@@ -179,7 +204,8 @@ js_gc(js_State *J, int report);
 
 

Force a garbage collection pass. -If the report argument is non-zero, print a summary of garbage collection statistics to stdout. +If the report argument is non-zero, send a summary of garbage collection statistics to +the report callback function.

Loading and compiling scripts

@@ -658,4 +684,12 @@ void js_unref(js_State *J, const char *ref);

WIP: Delete the reference from the registry. +

+ + + + diff --git a/docs/style.css b/docs/style.css index 40b388f..e8788e8 100644 --- a/docs/style.css +++ b/docs/style.css @@ -1,16 +1,33 @@ -@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic|Source+Code+Pro); +h1, nav, footer { font-family: sans-serif; } -body { - font-family: 'Source Sans Pro', sans-serif; - font-size: 12pt; - margin: 3pc; - max-width: 45em; - text-align: justify; +a { text-decoration: none; } +a:hover { text-decoration: underline; } +h2 { font-size: 1.25rem; } +h3 { font-size: 1.12rem; } +ul li { list-style-type: circle; } +pre, table, ol, dl { margin-left: 2rem; } +li { margin: 0; } +th, td { text-align: left; vertical-align: top; } + +body { margin: 0; } +h1 { + font-weight: normal; + margin: 0; + padding: 1rem 2rem; + background-color: #36648b; + color: white; } -pre, tt, code { - font-family: 'Source Code Pro', monospaced; - font-size: 11pt; +nav { + padding: 1rem 2rem; + background-color: #ddd; } -h2 { - border-bottom: 2px solid black; +nav a { color: #303030; padding-right: 2rem; } +article { + max-width: 50rem; + margin: 2rem; +} +footer { + background-color: #ddd; + color: #303030; + padding: 1rem 2rem; }