Panel and simple-storage

16 views
Skip to first unread message

35niavlys

unread,
Nov 3, 2011, 3:20:18 PM11/3/11
to mozilla-la...@googlegroups.com
Hello, sorry for my english.

I want to created a widget with a label. Label is "setting.html".
In this file I have an input text.
My question is how to save it and use it in main.js ?

Can you give me a simple exemple because the exemple in the "Developer Guide" is difficult for me.

Thanks.

35niavlys

unread,
Nov 4, 2011, 8:49:44 PM11/4/11
to mozilla-la...@googlegroups.com
I have find a other exemple. Now, my problem is how to send 2 parameters with "postMessage" because "postMessage(arg1, arg2)" don't work for me.

KWierso

unread,
Nov 4, 2011, 10:13:23 PM11/4/11
to mozilla-la...@googlegroups.com
This should work:

postMessage([arg1,arg2]);

Then wherever you're receiving the message it would do something like onMessage:function(arr) {
  var arg1=arr[0];
  var arg2=arr[1];
}

35niavlys

unread,
Nov 5, 2011, 6:03:37 AM11/5/11
to mozilla-la...@googlegroups.com
Thanks, it works !
Reply all
Reply to author
Forward
0 new messages