将适配器与草坪椅一起使用
我正在尝试在 Lawnchair 中使用适配器并遇到问题。我的代码中有几个适配器脚本:
<script src="scripts/Lawnchair.js"></script>
<script src="scripts/dom.js"></script>
<script src="scripts/webkit-sqlite.js"></script>
但是当我在 Lawnchair 构造函数中指定适配器时,出现以下错误:
Uncaught TypeError: Cannot call method 'valid' of undefined
这是我正在使用的代码。
var beers = Lawnchair({name:'beers',adapter:'webkit-sqlite'},function(e){
});
如何在 Lawnchair 中设置适配器?
I'm trying to use adapters in Lawnchair and running into an issue. I've got a couple of Adapter scripts in my code:
<script src="scripts/Lawnchair.js"></script>
<script src="scripts/dom.js"></script>
<script src="scripts/webkit-sqlite.js"></script>
But when I specify an adapter in my Lawnchair constructor, I get the following error:
Uncaught TypeError: Cannot call method 'valid' of undefined
Here's the code I'm using.
var beers = Lawnchair({name:'beers',adapter:'webkit-sqlite'},function(e){
});
How does one go about setting up adapters in Lawnchair?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有相反的适配器脚本:
这不会有任何区别。您似乎也不需要指定适配器。为您选择正确的一个...我想如果您确实根据您在收到错误时所使用的浏览器/设备来指定它,则应该指定
i have the adapter scripts the other way round:
not that this should make any difference. It also seems that you do not need to specify the adapter. the correct one is chosen for you... i think if you do specifiy it depending on the browser / devise you are using when you get the error you should specify