ph/opossum

Description
# Opossum Web Browser

Basic portable Web browser; only needs a Go compiler to compile.

The UI is built with https://github.com/mjl-/duit

Still very experimental and most features are missing, here's a screenshot: http://psilva.sdf.org/scr.png

Supported features:

- rudimentary CSS/HTML5 support, large parts like float/flex layout are just stub implementations
- Server-side rendered websites
- Images (pre-loaded all at once though)
- TLS
- experimental JS/DOM can be activated (very basic jQuery examples work)
- file downloads

# Install

## Plan 9

You can download a tarball with the binary at http://psilva.sdf.org/opossum-plan9-amd64.tgz

```
./opossum-plan9-amd64.bin
```

Also `/sys/lib/tls/ca.pem` needs to be present for TLS to work. ca certs can be downloaded from the curl homepage:

```
hget https://curl.haxx.se/ca/cacert.pem > /sys/lib/tls/ca.pem
```

To compile the source Go 1.16 is needed. Probably `$GOPROXY` should be set to `https://proxy.golang.org`

```
cd cmd/browse
go run .
```

There are various command line options, visible with `-h`, most importantly to see errors:

```
go run . '-quiet=false'
```

(`-quiet=false` produces a lot of output, consider turning on scroll since processing waits for that...)

or all messages:

```
go run . '-quiet=false' '-debug=true'
```

## macOS

Requirements:

- Go
- Plan9Port

```
cd cmd/browse
go run .
```

# JS support

It's more like a demo and it's not really clear right now how much sandboxing
is really needed. A rudimentary AJAX implementation
is there though.

Use on your own Risk!

![Demo](http://psilva.sdf.org/demo.gif "Demo")

Mostly based on goja (ECMAScript 5.1) and https://github.com/fgnass/domino
(DOM implementation in JS). Some sort of DOM diffing
is needed, also AJAX functions, `getComputedStyle` etc. are either missing or stubs.
Very simple jQuery based code works though, e.g. jQuery UI Tab view
https://jqueryui.com/resources/demos/tabs/default.html or the toggle buttons on
https://golang.org/pkg There is also highly experimental ES6 support with Babel.

Try on Plan 9 with e.g.:

```
go run . '-experimentalJsInsecure=true' -startPage https://jqueryui.com/resources/demos/tabs/default.html
```

or macOS etc.:

```
go run . -experimentalJsInsecure=true -startPage https://jqueryui.com/resources/demos/tabs/default.html
```


# TODO

- load images on the fly
- implement more parts of HTML5 and CSS
- create a widget for div/span
- clean up code, support webfs, snarf
Last 5 commits (shortlog)
Date Author Short message Commit hash
2021-02-26 Philip Support ajax also via jQuery 1.8 612c7ae57b92e3b1a56a606c415a26cccfe7c210
2021-02-23 Philip Use embed (and Go 1.16) for domino js files 8b6f2304278271517909d2a699a8e62b50c5968e
2021-02-21 Philip Fix bg artifacts on url change c5b15b0705ec856623c093cdc77cb4836e35c8d8
2021-02-21 Philip Transparent default bg for boxes ee9f9d3ea405fb6e546ce68cc63df4008c7bd4f8
2021-02-21 Philip no submit without surrounding form element af7eaeb14a83747ac7b5bdb5cfd3f0812d8219a3
Files (browse)
.gitattributes
.gitignore
LICENSE
README.md
browser/
cmd/
domino/
go.mod
go.sum
img/
logger/
nodes/
normalize.css
opossum.go
opossum_test.go
package.rc
possum-655x493.jpg
style/