General developer forum

iframe-resizer javascript

 
Picture of Pedro Remedios
iframe-resizer javascript
 

Hi,

I need to include the iframe-resizer javascript library in my module's view.php. What's the best way to do that? Do I insert it as raw html or is there a API function for that?

<script type="text/javascript" src="js/iframeResizer.min.js"><script>

Pedro


 
Average of ratings: -
Picture of Mark Johnson
Re: iframe-resizer javascript
Core developersParticularly helpful MoodlersPlugin developers

A cursory look at the bottom of the file suggests that it should work as an AMD module, in which case you should be able to include it like any other, with $PAGE->requires->js_call_amd();

 
Average of ratings: -
Picture of Pedro Remedios
Re: iframe-resizer javascript
 

What file were you looking at?

 
Average of ratings: -
Picture of Mark Johnson
Re: iframe-resizer javascript
 
Average of ratings: -
Picture of Pedro Remedios
Re: iframe-resizer javascript
 

Yes it is. I posted a new topic about an error I'm getting with this.

 
Average of ratings: -