Re: Javascript Security for Dummies

Thanks Toby (and Mark, in your other mail)


Ivan

On 2010-3-5 10:12 , Toby Inkster wrote:
> On Fri, 2010-03-05 at 09:20 +0100, Ivan Herman wrote:
>> I do have a technical question, though, for further clarification. You
>> say that, if a data is defined through JSONP, what this means is that
>> the HTML file that starts up the whole process should have an
>> additional <script...> element to get that. 
> 
> Typically when loading JSONP, the document would not include an actual
> <script> element that loads it. Rather the JSONP would be loaded by
> another script. e.g.:
> 
> <script type="text/javascript">
>   function load_data (u, cb)
>   {
>     document.write("<script src=\""+u+"?callback="+cb+"\"></script>");
>   }
>   function handle_data (d)
>   {
>     blah blah;
>   }
>   blah blah blah;
>   blah blah;
>   {
>     load_data(foo, handle_data);
>     load_data(bar, handle_data);
>   }
> </script>
> 
> So the RDFa author would not add JSONP script tags to their document.
> They'd add an RDFa API script to their document, which would in turn
> load JSONP files using document.write() or similar.
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF   : http://www.ivan-herman.net/foaf.rdf
vCard  : http://www.ivan-herman.net/HermanIvan.vcf

Received on Friday, 5 March 2010 10:04:39 UTC