Skip to content

@shanestevens /index.html secret
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
BootjackPolymer FAIL
<!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>
import 'package:bootjack/bootjack.dart';
import 'package:polymer/polymer.dart';
void main() {
initPolymer();
Dropdown.use();
}
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;
}
<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>
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.