67 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 | |
|     "http://www.w3.org/TR/html4/strict.dtd">
 | |
| <html lang="de">
 | |
|     <head>
 | |
|         <title>Hyphenator.js – Test 14</title>
 | |
|         <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 | |
|         <style type="text/css">
 | |
|             body {
 | |
|                 width:50%;
 | |
|                 margin-left:25%;
 | |
|                 margin-right:25%;
 | |
|             }
 | |
|             #test {
 | |
|             	background-color: #ffd6d6;
 | |
|             }
 | |
|             #ref {
 | |
|             	background-color: #d6ffd6;
 | |
|             }
 | |
|         </style>
 | |
|         <script src="../Hyphenator.js" type="text/javascript"></script>
 | |
|         <script type="text/javascript">
 | |
|                 Hyphenator.config({
 | |
|                 	hyphenchar:'|',
 | |
|                 	onhyphenationdonecallback:cb,
 | |
|                 	enablecache:false
 | |
|                 });
 | |
|                 Hyphenator.run();
 | |
| 				
 | |
| 				function cb() {
 | |
| 					var out=document.getElementById('output').firstChild;
 | |
| 					var res,start,end,times;
 | |
| 
 | |
| 					times=1000;
 | |
| 					start=new Date().getTime();
 | |
| 					for(var i=0; i<times; i++) {
 | |
| 						res=Hyphenator.hyphenate('Silbentrennung','de');
 | |
| 					}
 | |
| 					end=new Date().getTime();
 | |
| 					out.data="hyphenateWord('de','Silbentrennung')-> "+res+" :: "+((end-start)/times)+"ms\n";
 | |
| 					if (window != parent) {
 | |
| 						var msg = {
 | |
| 							desc: "hyphenateWord('de','Silbentrennung')-> "+res+" :: "+((end-start)/times)+"ms\n",
 | |
| 							index: 14,
 | |
| 							result: 'passed'
 | |
| 						};
 | |
| 						parent.postMessage(JSON.stringify(msg), window.location.href);
 | |
| 					}
 | |
| 				}
 | |
| 		</script>
 | |
|     </head>
 | |
|     <body>
 | |
| 		<p><a href="index.html"><<- index</a> | <a href="test13.html"><- Prev</a> | <a href="test15.html">Next -></a></p>
 | |
|         <h1>Test 14</h1>
 | |
|         <p id="desc">Measuring time to hyphenate a word.</p>
 | |
|         <pre>Hyphenator.config({
 | |
|     hyphenchar:'|',
 | |
|     enablecache:false
 | |
| });
 | |
| Hyphenator.run();
 | |
| </pre>
 | |
| 
 | |
| 		<p id="output" class="hyphenate test">Silbentrennung</p>
 | |
| 
 | |
|  		<p id="ref">hyphenateWord('de','Silbentrennung')-> Sil|ben|tren|nung :: 0._ _ _ms</p>
 | |
| 
 | |
|      </body>
 | |
| </html> |