共同スケッチ用に Google Plus One ボタンをMeteor アプリに含めようとしたところ、script
テンプレート内のタグが実行されていないことに気付きました。
<template name="gplus">
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-href="{{url}}"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
console.log("Google Plus button");
(function() {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
</template>
スクリプトを別の JavaScript ファイルに移動することでボタンが機能するようになりましたが、インライン スクリプトが機能しなかった理由はまだわかりません。
コンソールにスクリプト タグが表示されますが、スクリプト自体が実行されません。Meteor はどのようにこれを行いますか?