UNPKG

can

Version:

MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.

48 lines (40 loc) 1.06 kB
<!DOCTYPE html> <html lang="en"> <head> <title>can.route test page</title> </head> <body> <p>This is a dummy page to use<br/> for testing route goodness</p> <script type="text/javascript" src="../../node_modules/steal/steal.js" main="@empty"></script> <script type='text/javascript'> var clone = function(obj){ if(obj && typeof obj === "object") { var cln = {}; for(var key in obj) { if(obj.hasOwnProperty(key)) { cln[key] = clone(obj[key]); } } return cln; } else { return obj; } }; var configuration = clone(window.parent.CONFIGURATION||{}); // TODO pretty hacky. For some reason the original configuration object // gets changed by Steal configuration.shim = { "jquery/jquery.js": { "exports": "jQuery" } }; steal.config(configuration); steal('can/route/pushstate', function () { // make sure it's after ready setTimeout(function () { window.parent.routeTestReady && window.parent.routeTestReady(can.route, window.location, window.history, window) }, 30) }) </script> </body> </html>