xonecas.io
142
St

startsInvasion / files

startsInvasion / libs / node_modules / bean / support / syn / test / clickbasic.html

1.4 KB
1<!DOCTYPE html 
2     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
5<head>
6	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
7	<meta http-equiv="edit-Type" edit="text/html; charset=utf-8">
8
9
10	
11	
12	<link rel="stylesheet" type="text/css" href="http://fiddle.jshell.net/css/normalize.css"/>
13	<link rel="stylesheet" type="text/css" href="http://fiddle.jshell.net/css/result-light.css"/>
14	
15	
16	<script type='text/javascript' src='../../../steal/steal.js'></script>
17	<script type='text/javascript'>
18		steal.plugins('funcunit/synthetic').start();
19	</script>
20		
21	
22	<style type='text/css'>
23		body {
24			background-color: transparent;
25			padding: 10px;
26		}
27		
28	</style>
29	<script type='text/javascript'>
30	//<![CDATA[ 
31window.onload = function() {
32	var el = document.getElementById('element');
33	el.style.background = '#f99';
34	
35	
36	var addListener = function(el, type, event){
37	    if (el.addEventListener) el.addEventListener(type, event, false);
38	    else el.attachEvent('on' + type, event);
39	};
40	
41	
42	addListener(el, 'click', function(){
43	    alert('weird')
44		el.innerHTML += ' fn';
45	});
46	
47	el.onclick = function(){
48	    el.innerHTML += ' attr';
49	};
50	
51	setTimeout(function(){
52	    Syn.click({}, el, function(){
53	        el.style.background = '#99f';
54	    });
55	}, 1000);
56
57
58};
59	//]]> 
60	</script>
61</head>
62<body>
63	<div id="element">hello</div>
64
65
66</body>
67</html>