Using lawn adapters

I try to use adapters in Lawnchair and run into a problem. There are several 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 the adapter in my Lawnchair constructor, I get the following error:

 Uncaught TypeError: Cannot call method 'valid' of undefined 

Here is the code I'm using.

 var beers = Lawnchair({name:'beers',adapter:'webkit-sqlite'},function(e){ }); 

How to configure adapters in Lawnchair?

+6
source share
1 answer

I have adapter scripts in reverse order:

 <script src="assets/js/lawnchair/Lawnchair.js" type="text/javascript" charset="utf-8"</script> <script src="assets/js/lawnchair/adapters/webkit-sqlite.js"></script> <script src="assets/js/lawnchair/adapters/dom.js"></script> 

not that it should matter. It also seems that you do not need to specify an adapter. the right one is chosen for you ... I think if you specify it depending on the browser / development you are using, when you get an error you should specify

 adapters: ['dom', 'webkit-sqlite'] 
-1
source

Source: https://habr.com/ru/post/900012/


All Articles