This repository has been archived by the owner on Dec 19, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from dart-lang/0.4.1
update to 0.4.1 js versions
- Loading branch information
Showing
253 changed files
with
7,442 additions
and
3,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!doctype html> | ||
<!-- | ||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
<html> | ||
<head> | ||
<title>core-a11y-keys</title> | ||
|
||
<script src="packages/web_components/dart_support.js"></script> | ||
<link rel="import" href="packages/core_elements/core_a11y_keys.html"> | ||
<link rel="import" href="packages/polymer/polymer.html"> | ||
</head> | ||
<body unresolved> | ||
<template id="myTemplate" is="auto-binding-dart"> | ||
<style> | ||
div { | ||
height: 100px; | ||
width: 100px; | ||
background: gray; | ||
} | ||
</style> | ||
<core-a11y-keys id="a11y" keys="* pageup pagedown left right down up shift+a alt+a home end" on-keys-pressed="{{printKey}}"></core-a11y-keys> | ||
<div id="target" tabindex="0">focus this</div> | ||
<pre id="output"></pre> | ||
</template> | ||
|
||
<script type="application/dart"> | ||
import 'dart:async'; | ||
import 'dart:html'; | ||
import 'dart:js'; | ||
import 'package:core_elements/core_a11y_keys.dart'; | ||
import 'package:polymer/polymer.dart'; | ||
|
||
class MyModel { | ||
printKey(e) { | ||
var detail = new JsObject.fromBrowserObject(e)['detail']; | ||
querySelector('#output').text += '${detail['key']} pressed!\n'; | ||
} | ||
} | ||
|
||
main() { | ||
initPolymer().run(() { | ||
Polymer.onReady.then((_) { | ||
AutoBindingElement template = querySelector('#myTemplate'); | ||
template.model = new MyModel(); | ||
template.on['template-bound'].listen((_) { | ||
CoreA11yKeys keys = querySelector('#a11y'); | ||
keys.target = querySelector('#target'); | ||
}); | ||
}); | ||
}); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.