Last active
December 17, 2015 01:19
-
-
Save ekashida/5527581 to your computer and use it in GitHub Desktop.
Debugging "Get.css()" on Android 2.3.4 Uses `echoecho` instance provided by `yogi serve` on samegame.corp.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<head> | |
<style> | |
button { | |
font-size: 30px; | |
width: 300px; | |
height:150px; | |
} | |
</style> | |
<script src="http://3vnx.localtunnel.com/target/target-script-min.js"></script> | |
<script src="http://yui.yahooapis.com/3.10.0/build/yui/yui-min.js"></script> | |
</head> | |
<body> | |
<h1>Debugging "Get.css()" on Android 2.3.4</h1> | |
<button id="valid">Valid CSS</button> | |
<button id="bogus">bogus</button> | |
<button id="boguscss">bogus.css</button> | |
<button id="echo404">echo/status/404</button> | |
<button id="echo404css">echo/status/404?hack.css</button> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI().use('node', function (Y) { | |
Y.Object.each([ | |
{ | |
name: 'valid', | |
node: Y.one('#valid'), | |
url: 'http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css' | |
}, | |
{ | |
name: 'bogus', | |
node: Y.one('#bogus'), | |
url: 'http://eugene.me/bogus' | |
}, | |
{ | |
name: 'boguscss', | |
node: Y.one('#boguscss'), | |
url: 'http://eugene.me/bogus.css' | |
}, | |
{ | |
name: 'echo404', | |
node: Y.one('#echo404'), | |
url: 'http://samegame.corp.gq1.yahoo.com:5000/tests/unit/echo/status/404' | |
}, | |
{ | |
name: 'echo404css', | |
node: Y.one('#echo404css'), | |
url: 'http://samegame.corp.gq1.yahoo.com:5000/tests/unit/echo/status/404?hack.css' | |
} | |
], function (config, type) { | |
config.node.on('click', function () { | |
Y.log('clicked ' + config.name); | |
Y.Get.css(config.url, { | |
onSuccess: function () { | |
Y.log(config.url + ' onSuccess handler'); | |
}, | |
onFailure: function () { | |
Y.log(config.url + ' onFailure handler'); | |
} | |
}, function (err) { | |
if (err) { | |
Y.log(config.url + ' callback error:' + err.error); | |
Y.log(err); | |
return; | |
} | |
Y.log(config.url + ' callback invoked successfully'); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment