Tripped up by an unkept Promise

As you know, Kerika is a Web Application: everything runs inside a browser, without the need for any plug-ins or add-ons.

We achieve all this with a ton of JavaScript code (and a sprinkle of SVG, for our Whiteboards.)

One, significant, disadvantage of JavaScript is that it is “single threaded”: two bits of script cannot run at the same time; they have to run one after another.

So while Kerika is running inside a browser on your laptop, our JavaScript has to share a thread with lots of other stuff that’s going on, such as painting, updating styles, and handling user actions.  All of this has the potential to slow down Kerika, while the JavaScript code waits for something else to finish.

To get around this, we used JavaScript’s Promise function: this let Kerika’s code get going with its normal business while waiting for other browser functions to finish.  What we didn’t expect, however, was that the Promise function isn’t supported by Internet Explorer 11. (Although it is supported in Microsoft’s Edge browser.)

This caused problems for all of our Internet Explorer 11 users — people using Chrome, Safari, Firefox or Edge were unaffected.  We finally figured out what the underlying problem was, and did a workaround using a polyfill, which is a way to provide new functionality in older browsers that don’t support it natively.

Leave a Reply

Your email address will not be published.