- Add JS.retrieveData to main update loop

This commit is contained in:
ParticleG
2024-10-31 11:45:24 +08:00
parent ae37fde4b9
commit c33614a9cc

View File

@@ -188,7 +188,7 @@ if JS then
JS.callJS(JS.stringFunc( JS.callJS(JS.stringFunc(
[[ [[
window.navigator.clipboard window.navigator.clipboard
.writeText('') .writeText(%s)
.then(() => console.log('Copied to clipboard')) .then(() => console.log('Copied to clipboard'))
.catch((e) => console.warn(e)); .catch((e) => console.warn(e));
]], ]],
@@ -735,6 +735,10 @@ function love.run()
end end
return function() return function()
if JS and JS.retrieveData(1) then
return
end
local _ local _
local time=timer() local time=timer()