// js import 'dart:js' as Js; import 'dart:html'; abstract class IPlr {} class NPlr extends IPlr {} SpanElement Span(String cls) { return new SpanElement()..classes.add(cls); } DivElement Div(String cls) { return new DivElement()..classes.add(cls); } TableCellElement TD(TableRowElement tr) { TableCellElement td = new TableCellElement(); tr.append(td); return td; } ParagraphElement P(String cls) { return new ParagraphElement()..classes.add(cls); } String b(String str) { return str; } String smile(String str) { return '
'; } String l(String str, String key) { return str; } num drawText(CanvasRenderingContext2D ctx, String txt, int x, int y, int w, bool center) { TextMetrics tm = ctx.measureText(txt); ctx.fillText(txt, x, y + 15, w); return 1; } void main() { // Find an element by id (an-id). Element idElement = querySelector('#an-id')!; // Find an element by class (a-class). Element classElement = querySelector('.a-class')!; // Find all elements by tag (