^7heo | fuckin sailfishos | 01:35 |
---|---|---|
^7heo | always hoping it will get the community backing of android | 01:35 |
^7heo | but it does not | 01:36 |
^7heo | so the manpower stays low AF | 01:36 |
^7heo | and at he same time I keep breaking phones in frustation | 01:37 |
^7heo | at this point I'd rather have paid a monthly dev salary instead... | 01:38 |
*** zama_ is now known as zama | 05:20 | |
*** frinring_ is now known as frinring | 09:39 | |
X65Vbo | Hi all. I'm passing in a callback function as a parameter to call when the main function is finished. e.g. add(x, y, finishedfunction). This works e.g. add(1, 2, function() { console.log("I'm done!") }) | 11:38 |
X65Vbo | However, this fails when attempting to pass in values to the finishedfunction -- as the values bind too late (example coming up) | 11:39 |
X65Vbo | e.g. for(i = 0; i < 3; i++) { add(i, i+1, function() { console.log(i) }) } | 11:41 |
X65Vbo | Now let's assume add() takes a *really* long time to run. I'd expect the output of console.log to be 0, 1, 2. However because add() takes so long to run, let's say the for loop completes, what I end up with instead if console.log to be 2,2,2 | 11:42 |
X65Vbo | My question is, how can I get finishedfunction to use the value of i at the time it was passed in to add. And not the value of i, whatever it happens to be when the finishedfunction is called | 11:43 |
X65Vbo | Hm.... it works when you do this: add(x, y, finishedfunction, arg1), so e.g. add(i, i+1, finishedfunction, i) -- but I'd like to generalise it | 12:05 |
r0kk3rz | leszek: ooi have you ever looked at PWA support? | 12:46 |
leszek | r0kk3rz: not sure what that even is | 14:06 |
r0kk3rz | i'll take that as a no then :P | 14:07 |
r0kk3rz | PWA = progressive web app, in short the 'add to home' feature on android/ios | 14:07 |
coderus | X65Vbo: copy parameters in add? | 14:17 |
leszek | r0kk3rz: you can add a shortcut to the "home screen" with webcat already | 14:17 |
leszek | long press and hold on the bookmark star button will create a shortcut | 14:17 |
leszek | to that website | 14:18 |
r0kk3rz | im not talking about a shortcut to a bookmark | 14:34 |
r0kk3rz | this is launching a single page instance with no window chrome | 14:37 |
nh1402[m] | it's basically a self contained app of a website, isn't it? | 14:44 |
r0kk3rz | yeah more or less | 14:45 |
r0kk3rz | theres a couple of standards things to pay attention to, but thats about it | 14:46 |
r0kk3rz | because then we would have 'official' twitter / google maps / uber / tinder apps | 14:49 |
leszek | hmm... | 14:50 |
leszek | I hate that idead though wholeheartedly | 14:51 |
r0kk3rz | these things tend to use the latest browser features though, which might kill it a bit | 14:56 |
nh1402[m] | does the browser support webassembly? | 15:19 |
nh1402[m] | serviceworkers, webworkers, notifications etc. | 15:19 |
r0kk3rz | no idea | 15:29 |
CustosLimen | hi | 17:48 |
CustosLimen | what exactly is sailfish licensing from google for money | 17:48 |
CustosLimen | does the open source sailfish OS have android application support | 17:49 |
r0kk3rz | from google? nothing | 18:07 |
r0kk3rz | the android runtime sailfish uses is indeed proprietary, but its not licenced from google | 18:08 |
*** Nokius_ is now known as Nokius | 20:26 | |
*** feodoran is now known as Guest30450 | 23:57 | |
*** feodoran_ is now known as feodoran | 23:57 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!