Skip to content

The @open-pwa/client is a unified API to talk to Open PWA Hosts via Javascript. That supports diffrent Transports

License

Notifications You must be signed in to change notification settings

open-pwa/client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

client

The @open-pwa/client is a unified API to talk to Open PWA Hosts via Javascript. That supports diffrent Transports

Transports

  • window.postMessage - (Used to talk to the Open PWA Platform when running inside a window that is opened by the Open PWA Platform)
  • window.io - socket io
  • window.WebSocket
  • window.fetch
  • window.XMLHttpRequest
  • <script src=""></script>
  • window.PeerConnection

Open PWA Client - API

Will be enough in 99% of cases it will trigger the open-pwa protocol handler and request to open the current window

const openPwa = openPwaAuth(sdp)
const client = openPwa.get(window.location); // This will run 
// This code will not run outside of the Open PWA Application that is intended by design!
client.api.install(manifest)

About

The @open-pwa/client is a unified API to talk to Open PWA Hosts via Javascript. That supports diffrent Transports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published