Reputation: 2240
I was trying to add our website in to one of our client website and used iframe resizer. Their website uses Brightspot CMS. So That gives iframe-resizer undefined error.
When I made some changes to iframe resizer js file, which is I removed
if (typeof define === 'function' && define.amd) {
define([],factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') { //Node for browserfy
module.exports = factory();
} else {
window.iFrameResize = window.iFrameResize || factory();
}
and only kept
window.iFrameResize = window.iFrameResize || factory();
With this change everything works fine. Any idea why this could be happening?
Upvotes: 0
Views: 509
Reputation: 13097
If the website you adding this uses requireJS, then you must load this script with RequireJS.
Upvotes: 1