PWA — sw-register.js SAMPLE
PWA shell fixture SAMPLE (sw-register.js) for offline app-shell testing.
if ('serviceWorker' in navigator) navigator.serviceWorker.register('./sw-shell.js');
Specifications
- Role
- pwa-shell
- Wave
- G
What is a .js file?
JavaScript (.js) is a plain-text source file for the JavaScript language — the scripting language of the web, also used server-side via Node.js. It is dynamically typed and event-driven, with first-class functions, prototypes, and (in modern syntax) modules, classes, and async/await.
How to use this file
Use an example .js file to test syntax highlighters, linters (ESLint), formatters (Prettier), bundlers, and JavaScript parsers, or as editor and diff-viewer fixtures.
How to use this file for testing
“PWA — sw-register.js SAMPLE” is a deterministic Novus Examples fixture for Web assets. Favicons, web app manifests, service workers, robots and sitemap files, Open Graph images, and .well-known resources — for testing web tooling, crawlers, PWA installers, and asset pipelines.
Documented properties for this file: pwa-shell. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Web-platform fixtures are standards-compliant samples against fictional example.com data. Test crawlers, PWA installers and manifest validators, favicon/icon pipelines, service-worker registration, or .well-known parsers against the documented structure.
Code examples
node sw-register.jsRelated files
- xmlbrowserconfig.xml (MS tiles)A browserconfig.xml defining Windows Start-menu tile logos and colour — for testing MS tile configuration parsers and XML handling.

- pngPWA icon (192×192 PNG)A 192×192 PNG app icon referenced by the web app manifest (purpose 'any') — for testing PWA icon pipelines and manifest icon resolution.

- pngPWA icon (512×512 PNG)A 512×512 PNG app icon referenced by the web app manifest (purpose 'any') — for testing PWA icon pipelines and manifest icon resolution.

- pngPWA maskable icon (512×512 PNG)A 512×512 maskable PNG icon with the mark inside the central safe-zone and a full-bleed background — for testing maskable icon cropping across Android adaptive-icon shapes.

- jsonPWA Shortcut JSON — 01PWA shortcut descriptor SAMPLE #1 for install UI tests.

- jsonPWA Shortcut JSON — 02PWA shortcut descriptor SAMPLE #2 for install UI tests.

Generated by generation/breadth_wave_g.py. Free for any use, no attribution required — license.