0
bootstrap.js
を私のコンポーネントの1つに使用しようとしていますが、正しく動作するにはwrap(document)
が必要です。Polymer Webコンポーネントで文書varをラップします
// Script to work around bootstrap.js not working in Web Components. From https://github.com/Polymer/polymer/issues/625
(function(document){
jQuery.getScript('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js', function() {
console.log('getScript bootstrap.js run successfully!')
});
})(wrap(document));
しかし、それは動作するようには思えない - document
はまだbootstrap.jsにアクセスできないで私の影-DOM、と元のページです - どのように私はdocument
はそれを指してラップすることができます: は、これまでのところ私が持っていますbootstrap.js用の私のコンポーネントのDOMに?