Websocket refactor: Pull it out of the UI and support callbacks (#104)

* Websocket refactor: Pull it out of the UI and support listeners

* Changes required for Safari to be happy with modules

* Move to explicit ad-hoc callback registration
This commit is contained in:
Gabe Kangas
2020-08-06 10:55:33 -07:00
committed by GitHub
parent b0b5801c5f
commit df04af0f38
7 changed files with 246 additions and 139 deletions

View File

@@ -181,16 +181,16 @@
<script src="js/usercolors.js"></script>
<script src="js/utils.js?v=2"></script>
<script src="js/message.js?v=2"></script>
<script type="module" src="js/message.js?v=2"></script>
<script src="js/social.js"></script>
<script src="js/components.js"></script>
<script src="js/player.js"></script>
<script src="js/app.js?v=2"></script>
<script>
(function () {
const app = new Owncast();
app.init();
})();
<script type="module">
import Owncast from './js/app.js';
(function () {
const app = new Owncast();
app.init();
})();
</script>
<noscript>