just one more thing
indexdb is broken for file:// protocol, like many things
so when you get headache of nothing working, just setup that localhost server
who writes something
that is a question about authority
what is being written
that is a question about understanding
decentralization is an idea where you do not follow the most popular approach
many do not get this
here is a new revolutionary approach for software devs:
start with simple, working stuff
move to complex stuff after
current state of software apis:
here is minimal example of hello world:
(100 lines follows)
how to actually write hello world:
print("hello world")
way of js development:
- write bullshit apis
- write libraries on top to make complex apis more simple
to achieve simple outcome you have to import lots of complex libraries
why not:
write simple apis
do not import libraries to do simple stuff
write complex apis to do complex stuff on top
its ridiculous how much overly complex #apis js has, and why do these apis use weird callback structures rather than #await #async?
like why the fuck do i need to write:
ws.onopen = function(){
ws.send()
}
ws.onmessage = function(){}
instead of:
await ws.open()
const response = await ws.send()
#mozilla #chrome #google #devs #w3c
can you write proper apis, thanks
for some unknown reason indexdb is overly complex for simply storing value and retrieving value
i implemented two functions for very straight forward usage, which should have been provided by native api, but no way. well here is the usage:
await save_data(data)
await get_data()
there was no single working example of using #indexdb to #store and #retrieve single value
here is minimal example
indexdb should be able to #store very large amounts of permanent #data with #browser #javascript