Skip to content

Commit

Permalink
Enable service worker in dartpad_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
cheymos committed Nov 9, 2024
1 parent d17bf78 commit a75ade6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkgs/dartpad_ui/web/flutter_bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{{flutter_js}}
{{flutter_build_config}}

_flutter.loader.load();
const serviceWorkerSettings = {
serviceWorkerVersion: {{flutter_service_worker_version}}
};

_flutter.loader.load({
serviceWorkerSettings,
});

const splash = document.querySelector('#splash');

Expand All @@ -22,4 +28,4 @@ async function _initSplashTheme() {
: 'light';

splash.classList.add(theme);
}
}

0 comments on commit a75ade6

Please sign in to comment.