duckduckgo/p5-app-duckpan — pull request #88 by moollaza (2014-07-02 21:45:35+00:00)
Title: Force Duckpan to manually call Spice callback after templates are compiled

//cc @russellholt @jagtalon

This should be a *temporary* fix is regards to https://github.com/duckduckgo/zeroclickinfo-spice/issues/914

It seems that the current problem with Spices which have `call_type => 'self'` is that they're triggering a little too fast for DuckPAN because their callback functions are executed immediately after they are defined in their JS files.

This fix allows DuckPAN to tell the frontend if it needs to manually call the callback after the templates are compiled. You'll still see an error in the console from the first failed call which comes from the JS file. Right now I can't think of a better fix, but I'm open to suggestions!