There must be something different about how web pages are hosted inside any supported Office application that is running one of the new web-based add-ins (in Outlook, Word, Excel, etc.). The following error is thrown when the page loads (while debugging in Visual Studio 2015 in my case):
"Unhandled exception at line 2954, column 4 in jquery.mobile-1.4.5.js: 0x800a318f - JavaScript runtime error: Object expected"
I've tracked it down to this line:
The page can continue to load if the code is altered to wrap that in a try/catch block, otherwise the loader icon appears and doesn't go away.
I'm new to jQuery Mobile so I'm not sure exactly what the purpose of the containing function is, but for reference here are the value of the parameters that are passed to the replaceState() function:
I've reproduced this error both in Word and Outlook add-ins.