1

I am trying to use Lawnchair and have found that it seems to execute all functions twice. This may be just something I am doing wrong with JavaScript in general. Here is and example that does nothing other than demonstrate my problem.

console.log("Flag 1");

Lawnchair(function() {
    console.log("Flag 2");
});

In this example the console shows this.

Flag 1
Flag 2
Flag 2

So while the whole section of code is only getting called once, the inner function is indeed getting called twice.

Is this a syntax problem?

dakamojo
  • 1,839
  • 5
  • 21
  • 35
  • I have no idea, but on my own, I would put a console.log("Flag 3"); under then function declaration, and sprinkle some alert("alert N"); messages to see what's happening when. – Thunder Rabbit Apr 23 '12 at 00:25
  • I ran the same code in Firefox and saw "Flag 2" only once, so I think it's something else in your code. Can you post more code in your question? – Thunder Rabbit May 02 '12 at 04:49
  • I think this is possibly a bug in Lawnchair. my call backs are called twice as well, there is supposed to be a work around where you instantiate properly, but it didn't work for me. – Mr Shoubs May 04 '12 at 15:19

0 Answers0