Skip to content

Instantly share code, notes, and snippets.

@colbynatale-wf colbynatale-wf/example.dart Secret
Created Aug 17, 2015

What would you like to do?
// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.
import 'dart:html';
class PageRenderer {
void start() {
print('Add event listener ${identityHashCode(_handleKeyDown)}');
document.addEventListener('keydown', _handleKeyDown);
void end() {
print('Add event listener ${identityHashCode(_handleKeyDown)}');
document.removeEventListener('keydown', _handleKeyDown);
void _handleKeyDown(event) {
void main() {
querySelector('#output').text = 'Your Dart app is running.';
PageRenderer rend = new PageRenderer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.