Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

BootjackPolymer FAIL

View index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<!DOCTYPE html>
<html>
<head>
<title>BootjackPolymer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="packages/bootjack/css/bootstrap.css">
<link rel="import" href="polymer_test.html">
<script type="application/dart">export "main.dart";</script>
<script src="packages/browser/dart.js"></script>
</head>
 
<body>
 
<h1>Dropdown Polymer (FAIL)</h1>
 
<polymer-test></polymer-test>
 
<h1>Dropdown Non-Polymer</h1>
<ul>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#" id="drop1">Dropdown <b class="caret"></b></a>
<ul role="menu" class="dropdown-menu">
<li class="dropdown-header">Header #1</li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Header #2</li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</body>
</html>
View index.html
1 2 3 4 5 6 7
import 'package:bootjack/bootjack.dart';
import 'package:polymer/polymer.dart';
 
void main() {
initPolymer();
Dropdown.use();
}
View index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import 'dart:html';
import 'package:polymer/polymer.dart';
import 'package:bootjack/bootjack.dart';
 
@CustomTag('polymer-test')
class PolymerTest extends PolymerElement {
PolymerTest.created() : super.created() {
// added this after StackOverflow advice, to directly wire up the control, which now half works.
// if it's removed, nothing happens at all.
Dropdown.wire(this.shadowRoot.getElementById("my_dropdown_thingy"));
}
 
bool get applyAuthorStyles => true;
}
View index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<polymer-element name="polymer-test">
<template>
<ul>
<li class="dropdown">
<a id="my_dropdown_thingy" data-toggle="dropdown" class="dropdown-toggle" href="#">Dropdown <b class="caret"></b></a>
<ul role="menu" class="dropdown-menu">
<li class="dropdown-header">Header #1</li>
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Header #2</li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</template>
<script type="application/dart" src="polymer_test.dart"></script>
</polymer-element>
View index.html
1 2 3 4 5 6
name: BootjackPolymer
dependencies:
bootjack: any
browser: any
dquery: any
polymer: any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.