service_worker_test.dart 410 Bytes
Newer Older
1 2 3 4 5 6
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:html' as html;
Future<void> main() async {
7
  await html.window.navigator.serviceWorker?.ready;
8
  const String response = 'CLOSE?version=1';
9
  await html.HttpRequest.getString(response);
10
  html.document.body?.appendHtml(response);
11
}