tag:help.tenderapp.com,2008-11-12:/discussions/problems/53496-tender-breaks-javascript-on-pages-with-requirejsTender: Discussion 2013-10-18T21:50:56Ztag:help.tenderapp.com,2008-11-12:Comment/294080672013-10-15T16:58:09Z2013-10-15T16:58:09ZTender breaks Javascript on pages with require.js<div><p>Hi David,</p>
<p>This should be fixed now. Can you check?</p>
<p>Thanks!</p></div>Julientag:help.tenderapp.com,2008-11-12:Comment/294080672013-10-15T17:11:41Z2013-10-15T17:11:44ZTender breaks Javascript on pages with require.js<div><p>Yes, it seems to work now. Since this script has the potential
to break our production application, we're considering simply
downloading a copy and serving that static copy to our users,
rather than relying on your script. What's the least-risky way of
handling upgrades to your APIs?</p></div>David Baumgoldtag:help.tenderapp.com,2008-11-12:Comment/294080672013-10-15T17:35:06Z2013-10-15T17:35:06ZTender breaks Javascript on pages with require.js<div><p>Hey David,</p>
<p>Sorry about the error. I updated a lib and didn't notice it
switched to a module format.</p>
<p>We rarely update the widget, and aside from <a href=
"https://github.com/ded/domready">domready</a> which allows to
avoid bigger dependencies to execute code when the DOM is ready,
the widget code is pure JS and has no other dependencies. We test
changes in most browsers before deploying to avoid errors, but I
must admit I missed the require.js conflict, since we don't use it.
That is really an edge case, and now that I'm aware of it, it won't
happen again (the version of domready we use works well as is, the
update was not needed, so we can keep that version
indefinitely).</p>
<p>If you want to host the widget on your site, you should host it
on the same domain as your support site, as we use the host in the
code to find the matching Tender. When it comes to API updates, the
widget doesn't really use the API and all it does is load an
iframe, so there isn't much change going on JS side. We still do
small changes from time to time, but it's 99% styling to the popup,
and it's pretty rare. So you could easily check your version
against ours every few months.</p>
<p>I hope that answers your question/concerns.</p></div>Julien