Re: [caplet] Re: ADsafe, Take 3
- Another situation you may or may not have considered is the following:
This brings up the issue of what exactly is ADsafe guaranteeing its
or write any global variables and is unable to call any global
function (except as mediated by the ADSAFE object). This fails here
because this code is able to call the global "onerror" function.
The simplest solution is to require ADsafe code to be written using
the following idiom:
function it declares but asks the ADSAFE object to call the function.
The ADSAFE object can then call the function inside a try ... catch
block and expose an interface, like ADSAFE.onerror, to embedding
This idiom might be useful for other ADsafe features as well as the