Skip to content

Instantly share code, notes, and snippets.

@jacob414
Created February 26, 2011 22:19
Show Gist options
  • Save jacob414/845680 to your computer and use it in GitHub Desktop.
Save jacob414/845680 to your computer and use it in GitHub Desktop.
Weinre/Sencha Touch edge-case
<!-- Assumes Weinre running on localhost, and the file accessed via -->
<!-- another webserver also running on localhost. Accessing this file -->
<!-- locally (file://[..] protocol) doesn't provoke the issue. -->
<!-- Tried on OS X and Linux (recent Ubuntu) -->
<!DOCTYPE html>
<html>
<head>
<title>Weinre & Sencha Touch</title>
<script src="sencha-touch-1.0.1a.js"></script>
<script src="sencha-weinre.js"></script>
<script src="http://localhost:8081/target/target-script-min.js"></script>
<script>
Ext.setup({
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
var main = new Ext.Panel({
fullscreen: true,
layout: 'card',
items: [{html: 'Loading..'}]
});
setTimeout(function() {
main.add({html: 'Done loading'});
main.setActiveItem(1, 'slide');
}, 400);
}
});
</script>
</head>
<!-- Clue/wierdness: putting any node inside the body prevents the issue -->
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment