You can use defold-html-utils in your own project by adding this project as Defold library dependencies.
Open your game.project file and in the dependencies field under project add:
Good stuff! Thanks for sharing. I wonder if some of these should be part of the built in functions? I can definitely see is_mobile() being very useful to decide about input methods (virtual controller vs keyboard etc). What about the others? How are you using them?
focus, after every ads finish on poki. Focus must be return by poki, but manually focus make it better.
localstorage better then indexdb
IsMobile worked good. I use it to show wasd tooltip on pc, or virtualpad and buttons on mobile.
IsMobile use deprecated api, but i don’t find better alternative. At least you have 4 ways:)
sys.load can’t be used for HTML5 apps running on iframe from a different origin (cross-origin iframe)
– use localStorage instead because of this limitation on default IndexedDB