Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (40 sloc) 1.452 kb
<!DOCTYPE html>
<html>
<head>
<!--
Inject
Copyright 2011 LinkedIn
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied. See the License for the specific language
governing permissions and limitations under the License.
-->
<!--[if lte IE 7]>
<script src="/ie-localstorage-json-shim.js" type="text/javascript" id="ie-localstorage-shim"></script>
<![endif]-->
<script type="text/javascript" src="/inject.js"></script>
</head>
<body>
<h2>AMD (Asynchronous Module Definition)</h2>
<textarea id="code">
sandbox([
'<p id="output-sampleString"></p>',
'<p id="output-Qux"></p>'
]);
Inject.reset();
Inject.enableDebug("logging")
Inject.setModuleRoot("/examples/dependencies/amd/");
require.ensure(["qux.amd"], function(require){
var qux = require('qux.amd').qux;
document.getElementById("output-sampleString").innerHTML = new qux().sampleString;
document.getElementById("output-Qux").innerHTML = new qux().Qux();
});
</textarea>
<script type="text/javascript" src="resources/layout.js"></script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.