1
0
mirror of synced 2025-12-10 08:28:08 +08:00
Files
eruda/test/index.html
2016-06-11 19:46:26 +08:00

79 lines
2.6 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Eruda</title>
<link rel="stylesheet" href="style.css">
<script src="assets/eruda.js"></script>
</head>
<body>
<div id="test-element" class="border" style="color:red">
<!-- This is a comment -->
<div class="child-one">One</div>
<div class="child-two">Two</div>
<a href="https://github.com/liriliri/eruda">GitHub</a>
<div class="child-three" style="height: 500px">
This is a very long text!
This is a very long text!
This is a very long text!
This is a very long text!
This is a very long text!
</div>
<div class="fixed-footer">This is a footer!</div>
<div>
<img src="http://7xn2zy.com1.z0.glb.clouddn.com/blog_elf.jpg">
</div>
</div>
<button>Test</button>
<button onclick="xxx();">Trigger Error</button>
<div style="height: 500px;"></div>
<script>
// Test scripts
var test = document.getElementById('test-element');
test.addEventListener('click', function ()
{
console.log('test2');
}, false);
test.addEventListener('click', function ()
{
console.log('This is something really really cool!!!!! Laaaaaaaaaa!!!!!!!!!!!!!!!');
}, true);
test.addEventListener('touchstart', function ()
{
console.log('test3');
}, false);
function req(url)
{
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.send();
}
setTimeout(function ()
{
req('http://localhost:8080/webpack-dev-server/test/style.css');
}, 1000);
setTimeout(function ()
{
req('http://localhost:8080/webpack-dev-server/test/data.json');
}, 2000);
setTimeout(function ()
{
req('http://localhost:8080/webpack-dev-server/test/empty.json');
}, 3000);
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer';
xhr.open('GET', 'http://localhost:8080/webpack-dev-server/test/data.json');
xhr.send();
</script>
<script>
var el = document.createElement('div');
document.body.appendChild(el);
setTimeout(function () { eruda.init({container: el}) }, 1000);
</script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
<script>FastClick.attach(document.body);</script>-->
</body>
</html>