/index.html Secret
Last active
August 29, 2015 14:08
-
-
Save friegger/ff2c8c2a929be582e7cd to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Dart-Bug</title> | |
<link rel="stylesheet" href="style.css"> | |
<link rel="import" href="my_element.html"> | |
</head> | |
<body> | |
<h1>Dart-Bug</h1> | |
<p>Press remove input. Afterwards press F5. my-element is not evaluated. Open in new tab works.</p> | |
<my-element></my-element> | |
<script type="application/dart">export 'package:polymer/init.dart';</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
import 'dart:html'; | |
import 'package:polymer/polymer.dart'; | |
@CustomTag('my-element') | |
class MyElement extends PolymerElement { | |
MyElement.created() : super.created(); | |
removeInput(_){ | |
var inputField = $['input']; | |
inputField | |
..focus() | |
..onBlur.listen((_){ | |
inputField.remove(); | |
}); | |
inputField.remove(); | |
} | |
} |
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
<!DOCTYPE html> | |
<link rel="import" href="packages/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<input id="input" type="text"/> | |
<input id="removeButton" on-click="{{removeInput}}" value="Remove Input" type="button"/> | |
<div style="width: 200px; height: 200px; background-color: blue;"> | |
</div> | |
</template> | |
<script type="application/dart" src="my_element.dart"> | |
</script> | |
</polymer-element> |
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
name: dart_bug | |
version: 0.0.1 | |
description: A sample web application | |
dependencies: | |
browser: any | |
polymer: any | |
paper_elements: any | |
transformers: | |
- polymer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment