@pitaj I have removed the wrapper "thing" and changed the end of file as you suggest to
"function"==typeof define&&define.amd?define('iFrameResizer', [],C)
and now its trowing a another error
Uncaught Error: Mismatched anonymous define() module: function factory(){
function init(options,element){
function chkType(){
if(!element.tagName) {
throw new TypeError('Object is not a valid DOM element');
} else if ('IFRAME' !== element.tagName.toUpperCase()) {
throw new TypeError('Expected <IFRAME> tag, found <'+element.tagName+'>');
}
}
if(element) {
chkType();
setupIFrame(element, options);
iFrames.push(element);
}
}
function warnDeprecatedOptions(options) {
if (options && options.enablePublicMethods) {
warn('enablePublicMethods option has been removed, public methods are now always available in the iFrame');
}
}
var iFrames;
setupRequestAnimationFrame();
setupEventListeners();
return function iFrameResizeF(options,target){
iFrames = []; //Only return iFrames past in on this call
warnDeprecatedOptions(options);
switch (typeof(target)){
case 'undefined':
case 'string':
Array.prototype.forEach.call(
document.querySelectorAll( target || 'iframe' ),
init.bind(undefined, options)
);
break;
case 'object':
init(options,target);
break;
default:
throw new TypeError('Unexpected data type ('+typeof(target)+')');
}
return iFrames;
};
}
http://requirejs.org/docs/errors.html#mismatch
at F (nodebb.min.js:1)
at v (nodebb.min.js:1)
at Object.c [as require] (nodebb.min.js:1)
at requirejs (nodebb.min.js:1)
at <anonymous>:2:3
at m (nodebb.min.js:1)
at Pe (nodebb.min.js:1)
at v.fn.init.append (nodebb.min.js:1)
at v.fn.init.<anonymous> (nodebb.min.js:1)
at W (nodebb.min.js:1)
Can someone please try these 3 steps using widgets above? I'm really sorry to be a pain in the asx guys, kind of surprise that nobody have already try to implement this (An iFrame that fits well in nodeBB forums)
In the meantime, thank you so much for your attention and participation guys.
Vinicius Pereira