Using Adapters with Lawnchair
Asked Answered
S

1

6

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?

Steerage answered 25/10, 2011 at 6:59 Comment(0)
S
-1

i have the adapter scripts the other way round:

<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 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

adapters: ['dom', 'webkit-sqlite']
Skurnik answered 14/2, 2012 at 1:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.