electron中引入jquery

<!-- Insert this line above script imports  -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>

<!-- normal script imports etc  -->
<script src="scripts/jquery.min.js"></script>    
<script src="scripts/vendor.js"></script>    

<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>

解决jquery在electron容器中报错的问题

 

参见:https://stackoverflow.com/questions/32621988/electron-jquery-is-not-defined

posted @ 2018-01-17 09:25  demonrain  阅读(595)  评论(0编辑  收藏  举报