Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
db8b8c9
Remove enable automation, update go.mod
DavidArthurCole Jan 2, 2024
4d3a385
Update go.mod
DavidArthurCole Jan 2, 2024
e62fd0d
New browser support for Windows
DavidArthurCole Feb 6, 2024
5bfe265
Progress towards 0.1.4
DavidArthurCole Mar 30, 2024
7863b0f
Merge pull request #1 from zserge/master
DavidArthurCole Mar 30, 2024
7a4f516
Final push pre update
DavidArthurCole Mar 30, 2024
520e722
Nope, not doin all that
DavidArthurCole Mar 31, 2024
1d017f0
Add ability to refresh paths
DavidArthurCole Mar 31, 2024
d5349a5
Bruh
DavidArthurCole Mar 31, 2024
09d719c
b r u h I gotta slow down
DavidArthurCole Mar 31, 2024
71fa00d
Rollback EoF fixes, keep logging
DavidArthurCole Jul 20, 2024
1660448
Oh my sweet lord jesus
DavidArthurCole Jul 20, 2024
2ed93e4
Another working theory
DavidArthurCole Jul 21, 2024
cc8375c
Return successful debug port from chrome creation
DavidArthurCole Jul 30, 2024
646551f
Should probably make it accessible from the UI though
DavidArthurCole Jul 30, 2024
f5b1e7f
Update for 1.25
DavidArthurCole Jan 24, 2026
be09d66
Sum moment
DavidArthurCole Jan 24, 2026
e3ba714
Add mutexes
DavidArthurCole Apr 11, 2026
136042d
Setup framework for relay, tie into existing chrome architecture, fix…
DavidArthurCole Apr 12, 2026
13839eb
Full firefox support, with test cases. Hook chrome and its test files…
DavidArthurCole Apr 12, 2026
8e3977b
Fix bindings
DavidArthurCole Apr 12, 2026
057f821
Fix arg extraction
DavidArthurCole Apr 12, 2026
6c5559b
Fixes for firefox with tests this time
DavidArthurCole Apr 12, 2026
5a601bd
Add more tests for firefox, fixes for bindings, modernize github CI, …
DavidArthurCole Apr 12, 2026
8628d1e
Even more fixes for firefox bindings (fml)
DavidArthurCole Apr 12, 2026
d7bf2a7
Fix badge status
DavidArthurCole Apr 12, 2026
0baed76
Snap support for locate.go
DavidArthurCole Apr 12, 2026
c080e56
Slight relay fix; 1/2 done
DavidArthurCole Apr 12, 2026
bca4baf
Second half of relay fix
DavidArthurCole Apr 12, 2026
cdb3755
Fix early connect in relay
DavidArthurCole Apr 12, 2026
66e01d7
Fix delays in firefox startup
DavidArthurCole Apr 12, 2026
066b191
Fix firefox sequence colission
DavidArthurCole Apr 12, 2026
cf0cad2
Fix jittering in chrome
DavidArthurCole Apr 12, 2026
f18155a
Fix splits in firefox
DavidArthurCole Apr 13, 2026
c017160
Fix disconnects in firefox
DavidArthurCole Apr 13, 2026
152a4aa
Fix formatting
DavidArthurCole Apr 13, 2026
b566c0d
Remove verbose debug from firefox
DavidArthurCole Apr 13, 2026
67e4a65
Firefox pathing for icons
DavidArthurCole Apr 13, 2026
94bc29d
Fixes for relay mutexes
DavidArthurCole Apr 13, 2026
aea33a9
Fix relay hang
DavidArthurCole Apr 13, 2026
fb571d2
Fix firefox kill signals
DavidArthurCole Apr 25, 2026
693044f
Many fixes for firefox
DavidArthurCole Apr 28, 2026
e8cc297
Cleanup and regress of debug
DavidArthurCole Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@ name: CI Pipeline
on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Chrome
run: |
sudo apt-get update
sudo apt-get install -yqq google-chrome-stable
- name: Install Go
uses: actions/setup-go@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.16'
go-version: stable
cache: true
cache-dependency-path: go.sum

- name: Install Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome

- name: Install Firefox
uses: browser-actions/setup-firefox@v1
id: setup-firefox

- name: Vet
run: go vet ./...

- name: Run tests
run: go test -v -race ./...
- name: Build examples
env:
CGO_ENABLED: 0
run: |
go build -o example-hello ./examples/hello
go build -o example-stopwatch ./examples/stopwatch
go build -o example-counter ./examples/counter
LORCACHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
LORCAFIREFOX: ${{ steps.setup-firefox.outputs.firefox-path }}
run: go test -v -race -count=1 ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ example/Example.app
!/.idea/inspectionProfiles/Project_Default.xml
!/.idea/dictionaries/*.xml
!/.idea/go.xml
/docs
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Serge Zaitsev
Copyright (c) 2024 David Arthur Cole

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Lorca

[![Build Status](https://img.shields.io/github/workflow/status/zserge/lorca/CI%20Pipeline)](https://github.com/zserge/lorca)
[![GoDoc](https://godoc.org/github.com/zserge/lorca?status.svg)](https://godoc.org/github.com/zserge/lorca)
[![Go Report Card](https://goreportcard.com/badge/github.com/zserge/lorca)](https://goreportcard.com/report/github.com/zserge/lorca)
[![Build Status](https://img.shields.io/github/actions/workflow/status/DavidArthurCole/lorca/ci.yml?branch=master)](https://github.com/DavidArthurCole/lorca)
[![GoDoc](https://godoc.org/github.com/DavidArthurCole/lorca?status.svg)](https://godoc.org/github.com/DavidArthurCole/lorca)
[![Go Report Card](https://goreportcard.com/badge/github.com/DavidArthurCole/lorca)](https://goreportcard.com/report/github.com/DavidArthurCole/lorca)

<div>
<img align="left" src="https://raw.githubusercontent.com/zserge/lorca/master/lorca.png" alt="Lorca" width="128px" height="128px" />
<img align="left" src="https://raw.githubusercontent.com/DavidArthurCole/lorca/master/lorca.png" alt="Lorca" width="128px" height="128px" />
<br/>
<p>
A very small library to build modern HTML5 desktop apps in Go. It uses Chrome
Expand Down
24 changes: 24 additions & 0 deletions browser.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package lorca

import "encoding/json"

// browserImpl is the internal interface each browser backend implements.
// ui holds a browserImpl and delegates all browser interactions through it.
type browserImpl interface {
eval(expr string) (json.RawMessage, error)
load(url string) error
bounds() (Bounds, error)
setBounds(Bounds) error
injectScript(js string) error // registers script for all future docs + runs on current page
injectBinding(name string) error // like injectScript but avoids cross-realm calls for Firefox
setBlockBackNavigation(enable bool)
setAppUserModelID(id string)
kill()
done() <-chan struct{}
}

// Compile-time interface checks.
var (
_ browserImpl = (*chrome)(nil)
_ browserImpl = (*firefox)(nil)
)
Loading