I created a javascript module to use the iFrame-Resizer library (https://github.com/davidjbradshaw/iframe-resizer). I'm getting the error "No define call for mod_telemedia/iFrameResize".
This is what I have in my mod/telemedia/amd/src/iFrameResize.js:
define(['jquery', 'mod_telemedia/iFrameResizer'], function ($, c) {- iFrameResizer is the iFrameResizer.js provided by the library.
return {
resize: function() {
iFrameResize({log:true}, '#iFrame');
}
};
});
- iFrameResize is the function to call from the library.
I'm calling the resize function in my view.php like this:
$PAGE->requires->js_call_amd('mod_telemedia/iFrameResize', 'resize');Is there something I'm doing wrong?
Thanks in advance,
Pedro