github.com/acrespo/mobile@v0.0.0-20190107162257-dc0771356504/example/ivy/android/app/src/main/assets/tape.html (about) 1 <!-- 2 Copyright 2015 The Go Authors. All rights reserved. 3 Use of this source code is governed by a BSD-style 4 license that can be found in the LICENSE file. 5 --> 6 <html> 7 <head> 8 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 9 <style> 10 body { 11 font-family: sans-serif; 12 } 13 14 div { 15 padding: 1; 16 } 17 18 .comment { 19 color: grey; 20 } 21 22 .flow-hide { 23 text-overflow: ellipsis; 24 word-break: break-all; 25 white-space: nowrap; 26 overflow: hidden; 27 } 28 29 .flow-show { 30 word-break: break-all; 31 } 32 </style> 33 34 <script> 35 36 function flowClick(el) { 37 el.classList.toggle("flow-hide"); 38 el.classList.toggle("flow-show"); 39 } 40 41 function appendDiv(txt, tag) { 42 var el = document.createElement("div"); 43 el.innerHTML = txt; 44 if (tag == "comment") { 45 el.classList.add("comment"); 46 } else if (tag == "expr") { 47 48 } else { 49 el.classList.add("flow-show"); 50 el.onclick = function() { 51 flowClick(el); 52 }; 53 } 54 document.body.appendChild(el); 55 } 56 57 </script> 58 <body> 59 </body> 60 </html>