main-classic.js — vite Source File
Architecture documentation for main-classic.js, a javascript file in the vite codebase.
Entity Profile
Relationship Graph
Source Code
// prettier-ignore
function text(el, text) {
document.querySelector(el).textContent = text
}
let classicWorker = new Worker(
new URL('../classic-worker.js', import.meta.url) /* , */,
// test comment
)
// just test for case: ') ... ,' mean no worker options params
classicWorker = new Worker(new URL('../classic-worker.js', import.meta.url))
classicWorker.addEventListener('message', ({ data }) => {
switch (data.message) {
case 'ping': {
text('.classic-worker', data.result)
break
}
case 'test-import': {
text('.classic-worker-import', data.result)
break
}
}
})
classicWorker.postMessage('ping')
classicWorker.postMessage('test-import')
// prettier-ignore
// test trailing comma
const classicSharedWorker = new SharedWorker(
new URL('../classic-shared-worker.js', import.meta.url),
{
type: 'classic'
}, // test comment
)
classicSharedWorker.port.addEventListener('message', (ev) => {
text('.classic-shared-worker', JSON.stringify(ev.data))
})
classicSharedWorker.port.start()
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does main-classic.js do?
main-classic.js is a source file in the vite codebase, written in javascript. It belongs to the ViteCore domain, DevServer subdomain.
What functions are defined in main-classic.js?
main-classic.js defines 1 function(s): text.
Where is main-classic.js in the architecture?
main-classic.js is located at playground/worker/worker/main-classic.js (domain: ViteCore, subdomain: DevServer, directory: playground/worker/worker).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free