UNPKG

five-bells-visualization

Version:
61 lines (40 loc) 1.23 kB
<!doctype html> <html> <head> <script src="../../../../perf-lib/perf.js"></script> <title>Template Test</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="import" href="../../lang.html"> <link rel="import" href="../../module.html"> <link rel="import" href="../annotations.html"> <style> pre { font-family: monospace; font-size: 11px; } </style> </head> <body> <script>console.perf();</script> <template> <span id="foo" attribute="{{path}}" oneway="[[otherpath]]" style:="{{specialStyle}}">{{text}}</span> </template> <pre></pre> <script> using('Annotations', function(Annotations) { var template = document.querySelector('template'); var list = Annotations.parseAnnotations(template); console.log(list); var out = document.querySelector('pre'); out.textContent = JSON.stringify(list, function(key, value) { if (key === 'parent') { return '<parent reference>'; } return value; }, ' '); }); </script> <script>console.perfEnd();</script> </body> </html>