On 29/03/2012 13:47, hamburger wrote:
thx Arian,
thats a good hint.
I have it.

keep in mind that bundlers like jawr or minifiers may give you grief if they are unaware of this pattern. in particular:

!function() {}()

!function() {}()

is fine.

but if it gets converted to:
!function() {}()!function() {}()

it will cause an exception

closure now puts the ; correctly but ... you get the idea.

eg issues with twitter bootstrap that uses this pattern:
https://github.com/twitter/bootstrap/issues/401

https://github.com/twitter/bootstrap/pull/2069

https://github.com/twitter/bootstrap/issues/625

etc etc.

regards,
--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"
http://fragged.org/ | @D_mitar | https://github.com/DimitarChristoff

Reply via email to