<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div style="-webkit-text-size-adjust: auto;">I have exposed a function setObject() through webkit idl. Suppose i have a javascript class like</div><div style="-webkit-text-size-adjust: auto;"><span class="kwd" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"><br></span></div><div style="-webkit-text-size-adjust: auto;"><span class="kwd" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">function</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="typ" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">Player</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">()</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">{</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">var</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> speed </span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">=</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="lit" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">5</span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">;</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">var</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> x </span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">=</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="lit" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">50</span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">;</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">
</span><span class="kwd" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">var</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> y </span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">=</span><span class="pln" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"> </span><span class="lit" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">50</span><span class="pun" style="background-color: rgba(255, 255, 255, 0); margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">;}</span></div><div><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">var p = new Player();</span></font></code></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><span style="font-family: UICTFontTextStyleBody; background-color: rgba(255, 255, 255, 0); white-space: normal; -webkit-text-size-adjust: auto;">setObject(p);</span></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"><br></span></font></code></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">In webkit, i am getting the p as JSValue object. I want to retrieve the value of x through this JSValue object. how can i do that?</span></font></code></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">any help would be appreciated..</span></font></code></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"><br></span></font></code></pre><pre class="default prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 10px; padding: 5px; border: 0px; vertical-align: baseline; overflow: auto; width: auto; max-height: 600px; word-wrap: normal;"><code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; white-space: normal; -webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody"><span class="pun" style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;"><br></span></font></code></pre><span style="-webkit-text-size-adjust: auto;">Sent from my iPad</span></div></body></html>