background-fetch
background-fetch copied to clipboard
is updateUI better replaced via postMessage?
In response to https://github.com/w3ctag/design-reviews/issues/279
Seeing examples like event.updateUI(
Level ${level} ready to play!);
, it is not clear to me as an app developer whether I would like that to be updated in platform UI, a notification or a toast integrated inside my game.
For this reason, I am wondering whether just using postMessage/onmessage might make more sense for updating such UI.
updateUI
is for platform-controlled UI (such as a notification), so postMessage
doesn't seem appropriate. For page-based UI, postMessage
is the recommendation.
Maybe at least make it clear in the spec/explainer that this is not always the thing to use. I still think that the "UI" name is way too generic, and maybe it is better to know - or define - what UI is actually being updated
I guess we need to come up with a name for the UI
. Seems confusing to call it a 'notification', especially as that's unlikely to be the implementation on desktop. Open to ideas.