starlight icon indicating copy to clipboard operation
starlight copied to clipboard

Document how to instantiate new DOM objects from Lua

Open paulcuth opened this issue 9 years ago • 3 comments

For example: local date = window.Date.new()

paulcuth avatar Jun 12 '16 21:06 paulcuth

Hello, I try to use this code but I always got a Error: attempt to index a nil value

Here is my code:

function startClock()
  local today = window.Date.new()
end

I also tried using window.extract()

Just to keep trace.

MangelMaxime avatar Jun 13 '16 21:06 MangelMaxime

Hi @MangelMaxime, I've updated the version in the CDN to the latest master so this should be working now: http://jsbin.com/bubexoyiwa/edit?html,console

paulcuth avatar Jul 11 '17 19:07 paulcuth

Seems to work :) We can close I suppose

MangelMaxime avatar Jul 11 '17 20:07 MangelMaxime