Your questison is about the Polymer.dart port, but applies to Polymer.js devs as well :)
As you point out, the issue is with Bootstrap's JS. It doesn't know about ShadowDOM and attempts to fetch nodes from the DOM using global selectors. For example, in bootstrap-carousel.js, I see things like:
$(document).on('click.carousel.data-api', ...', function (e) { ...});
We explored using Bootstrap components inside of Polymer a little bit ago:
https://github.com/Polymer/more-elements/tree/stable/Bootstrap
The most interesting to you would be <bs-accordion-item>
(Demo)
The process is basically to wrap Bootstrap stuff inside a custom element and call into their APIs.
For the CSS: if you include their stylesheet inside your element, things should generally work:
<polymer-element name="my-element">
<template>
<link rel="stylesheet" href="bootstrap.css">
...
</template>
<script>...</script>
</polymer-element>
Keep in mind that if bootstrap.css is coming from a CDN, it needs to be CORS-enabled for the polyfills to work properly. This requirement goes away when native HTML Imports lands.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…