opitzconsulting / uitest.js

uitest.js is able to load a webpage into a frame, instrument that page and the javascript in that page (e.g. add additional scripts at the end of the document, ...) and execute actions on that page.
MIT License
67 stars 8 forks source link

Requirejs app that uses `require.onResourceLoad` does not work #17

Closed tbosch closed 11 years ago

tbosch commented 11 years ago

Hi, apps that rely on require.onResourceLoad don't work right now.

This snippet in requirejsScriptAdder.js should do the trick:

function patchRequire(win, appends) {
    var _require = win.require;
    win.require = function(deps, originalCallback) {
        _require.onResourceLoad = win.require.onResourceLoad;

Tobias