Request.HTML with external JavaScripts v0.1

This small plugin enhances Request.HTML to support external JavaScript files as well.

Supported browsers: ie7+, opera 10.10+, firefox 3.5+, safari4+, chrome4+



Details

Author
Jan Moehrke
Current version
v0.1
GitHub
berlinsurfer/Request.HTML-with-external-JavaScripts
Downloads
1562
Category
Request
Report
GitHub Issues

Releases


Dependencies

  • core/1.2.4:
    • Core/Request.HTML
    • More/Class.Refactor
    • More/Group

How to use

First you must include Request.HTML.external.js in the head of your html document in order to have Request.HTML refactored. The new script adds an option called "evalExternalScripts". If set to false or if no externals scripts are found in the response, Request.HTML has its normal bevahiour.

window.addEvent('domready', function() {
  new Request.HTML('newPage.html');
});

When you now request newPage.html via Request.HTML (from any other file), first all the other javascript-files are loaded. Afterwards the domready-Event is fired. In this way it's possbile to keep the needed loading code very small (thus loading new code only when it's needed).



Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus