摘要: https://btholt.github.io/complete-intro-to-realtime/socketio https://btholt.github.io/complete-intro-to-realtime/intro-to-websockets Socket.io: FE: co 阅读全文
posted @ 2022-07-15 21:27 Zhentiw 阅读(28) 评论(0) 推荐(0) 编辑
摘要: https://btholt.github.io/complete-intro-to-realtime/intro-to-http2-push long-running HTTP call HTTP2 PUSH FE: async function getNewMsgs() { let reader 阅读全文
posted @ 2022-07-15 19:43 Zhentiw 阅读(46) 评论(0) 推荐(0) 编辑
摘要: Polling with setTimeout async function getNewMsgs() { let json; try { const res = await fetch("/poll"); json = await res.json(); } catch (e) { // back 阅读全文
posted @ 2022-07-15 19:10 Zhentiw 阅读(111) 评论(0) 推荐(0) 编辑
摘要: const $: any = {} /** * Get the <button> element with the class 'continue' * and change its HTML to 'Next Step...' */ $("button.continue").html("Next 阅读全文
posted @ 2022-07-15 15:56 Zhentiw 阅读(30) 评论(0) 推荐(0) 编辑