General developer forum

Javascript Module Error

Picture of Pedro Remedios
Javascript Module Error

I created a javascript module to use the iFrame-Resizer library ( 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) {
return {
resize: function() {
iFrameResize({log:true}, '#iFrame');
- iFrameResizer is the iFrameResizer.js provided by the library.

- 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,


Average of ratings: -
Picture of Pedro Remedios
Re: Javascript Module Error

Anybody have a clue about this?

Average of ratings: -