I
I
IIIu6ko2017-02-24 16:09:37
css
IIIu6ko, 2017-02-24 16:09:37

Is there a polyfill for flexbox?

Who knows a good polyfill? flexibility doesn't seem to work

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Pushkarev, 2017-02-24
@AXP-dev

https://philipwalton.github.io/polyfill/

R
romasovest, 2017-11-05
@romasovest

Oh friends, the question is closed, I have an error in if(r<0.05 && lap<10), I was looking for the condition incorrectly. I apologize for the flood) If it is useful to someone (I saw questions on recursions here), then here is a working version

function a(callback){ // некая асинхронная функция с колбэком
  setTimeout(function(){
    var random = Math.random()
    console.log(random);
    callback(random);
  }, 1000);
}

(function b(lap=0){ 
  // нужно выполнять a() пока не 
  // получим <0.05 но не более 10 раз
  a(function(r){ 
    if(r>0.05 && lap<10) b(lap+1);
  });
})(); // поехали

S
Stalker_RED, 2017-11-05
@Stalker_RED

if(r<0.05 && lap<10) b(lap+1);
You have a 5% chance that the result will not work the first time. Therefore, almost always only one cycle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question