Commit 423af568 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Add test with localStorage

parent f014f194
......@@ -13,12 +13,14 @@
<div id="app">
<table style="border:3px;width:100%">
<tr>
<td width=50%><button @click='knowledge.add("exp", "subj1", "ex1", "repleft"+performance.now()-t0+"ms")'>Left</button></td>
<td width=50%><button @click="saveTime()">Left</button></td>
<td width=50%><button>Right</button></td>
</tr>
</table>
<h1> {{ message }} </h1>
</div>
<script src="vue.js"></script>
<script type="text/javascript">
var t0 = performance.now()
......@@ -27,25 +29,32 @@ var app = new Vue({
el: '#app',
data: {
message:"",
joints:[],
angles:[]
},
created: function(){
mounted() {
},
created: function(){
message=localStorage.getItem('cats')
QiSession(function(session){
session.service("ALMotion").then(function(motion){
session.service("ALKnowledge").then(function(knowledge){
this.app.knowledge=knowledge
motion.getBodyNames("JointActuators").then(function(result){
this.app.joints = result
})
this.app.joints = result
})
})
,function(){
print("Erreur starting")
}
})
}
}
,
methods:{
saveTime(){
localStorage.time=performance.now()-t0+'ms'
}
}
})
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment