sy/pwaupdate

Progressive web app update web component

2.0.0 2022-10-16 20:47 UTC

This package is auto-updated.

Last update: 2024-04-17 00:03:51 UTC


README

Progressive web app update web component

Installation

Install the latest version with

$ composer require sy/pwaupdate

Basic Usage

<?php

use Sy\Component\Html\Page;
use Sy\Component\Web\PwaUpdate;

$pwaupdate = new PwaUpdate([
	'swpath' => '/js/mysw.js'
]);

$page = new Page();

$page->addBody($pwaupdate);

echo $page;

Output:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate" crossorigin="anonymous" defer></script>
</head>
<body>
<pwa-update swpath="/js/mysw.js"></pwa-update>
</body>
</html>