Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: ec8c7e4b7a
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (48 sloc) 0.979 kB
<!DOCTYPE HTML>
<html>
<head>
<title>plugin relative ids test</title>
<script>
curl = {
baseUrl: '',
paths: {
curl: '../src/curl'
}
};
</script>
<script src="../src/curl.js" type="text/javascript"></script>
<script type="text/javascript">
define('plugin-that-processes-relative-ids', function(){
return {
load: function(id, require, loaded, config){
// loads two instead of one
require(['./two'], loaded);
}
};
});
curl(
['plugin-that-processes-relative-ids!stuff/one'],
function (two) {
var testId = 'should load sibling module';
if (2 == two) {
write('SUCCESS: ' + testId);
}
else {
write('FAILED: ' + testId);
write('- expected: 2, got: ' + two);
}
},
function (ex) {
write('ERROR: ' + ex.message);
}
);
function write (msg) {
curl('domReady!', function () {
document.body.appendChild(document.createElement('div')).innerHTML = msg;
});
}
</script>
</head>
<body>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.