GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — nullstack/client/index.js at master · GuiDevloper/nullstack

Expand file tree

/

index.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
104 lines (92 loc) · 3.06 KB
/

index.js

Copy path

File metadata and controls

104 lines (92 loc) · 3.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import element from '../shared/element'
import generateTree from '../shared/generateTree'
import { loadPlugins, useClientPlugins } from '../shared/plugins'
import client from './client'
import context, { generateContext } from './context'
import environment from './environment'
import hydrate from './hydrate'
import instanceProxyHandler, { instanceProxies } from './instanceProxyHandler'
import page from './page'
import params, { updateParams } from './params'
import project from './project'
import render from './render'
import rerender from './rerender'
import router from './router'
import settings from './settings'
import state from './state'
import worker from './worker'
context.page = page
context.router = router
context.settings = settings
context.worker = worker
context.params = params
context.project = project
context.environment = state.environment
client.memory = state.instances
const scope = client
scope.generateContext = generateContext
scope.context = context
client.plugins = loadPlugins(scope)
if (environment.development) {
globalThis.$nullstack = context
}
export default class Nullstack {
static use = useClientPlugins
static context = generateContext({})
static start(Starter) {
setTimeout(async () => {
window.addEventListener('popstate', () => {
router._popState()
})
if (client.initializer) {
client.initializer = () => element(Starter)
client.update()
return this.context
}
client.routes = {}
updateParams(router.url)
client.currentInstance = null
client.initializer = () => element(Starter)
client.selector = document.getElementById('application')
if (environment.mode === 'spa') {
scope.plugins = loadPlugins(scope)
worker.online = navigator.onLine
typeof context.start === 'function' && (await context.start(context))
context.environment = environment
client.virtualDom = await generateTree(client.initializer(), scope)
const body = render(client.virtualDom)
client.selector.replaceWith(body)
client.selector = body
} else {
client.virtualDom = await generateTree(client.initializer(), scope)
hydrate(client.selector, client.virtualDom)
client.currentMeta = client.nextMeta
client.currentHead = client.nextHead
client.nextMeta = { body: {}, html: {}, window: {} }
client.nextHead = []
context.environment = environment
scope.plugins = loadPlugins(scope)
worker.online = navigator.onLine
typeof context.start === 'function' && (await context.start(context))
client.nextVirtualDom = await generateTree(client.initializer(), scope)
rerender()
}
client.processLifecycleQueues()
delete state.context
}, 0)
return this.context
}
prerendered = false
initiated = false
hydrated = false
terminated = false
key = null
constructor() {
const proxy = new Proxy(this, instanceProxyHandler)
instanceProxies.set(this, proxy)
return proxy
}
render() {
return false
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.