You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Mike Samuel <mi...@gmail.com> on 2008/03/07 02:09:30 UTC
Patch to add DOMita to features/caja
Attached is a patch.
Kevin suggested that it'd be a good idea to get the added files from the
Caja JAR instead of copying them into the shindig source tree.
He also suggested consolidating and minifying those files in the JAR since
shindig doesn't do runtime minification.
That's a great idea but I'd like to do that in a separate change. I will
talk to Mike Stay on Caja to make sure the jar contains those files or a
minified JS bundle in future versions.
features/caja contains runtime support for Cajoling of gadgets. See
code.google.com/p/google-caja
DOMita provides a partial fake DOM Level 2 implementation that gates gadget
access to the DOM
This change adds DOMita and updates the html sanitizer used when the Caja
feature is enabled.
Some of the functionality in container.js is redundant with domita, and is
removed, but none of that functionality should be triggered when the Caja
feature is disabled.
cheers,
mike
Re: Patch to add DOMita to features/caja
Posted by Cassie <do...@apache.org>.
I feel like we won't need non-minified code for a while but when we do I
don't see #2 as being a bad option.
#3 sounds horrendous to me
- Cassie
On Fri, Mar 7, 2008 at 2:30 AM, Kevin Brown <et...@google.com> wrote:
> I talked with Mike about this on Wednesday. There are a few possibilities:
>
> 1. Implement dynamic minification in shindig using Rhino, or possibly even
> the caja parser if it makes sense.
> 2. Have caja packaged to include both debug and minified versions of the
> files
> 3. Keep what we have and be careful about making sure that we always keep
> what's checked into shindig up to date with what's in caja.
> 4. Ignore the issue for now and just assume that by the time we're using
> caja across the board, we'll be running our feature javascript through it
> anyway and can minify it there.
>
> On Thu, Mar 6, 2008 at 5:18 PM, Bruno Bowden <br...@google.com> wrote:
>
> > Shindig should be able to use Caja in debug mode with non-minified
> > versions
> > of those added files. I'm not sure of the correct way to do that.
> >
> > On Thu, Mar 6, 2008 at 5:09 PM, Mike Samuel <mi...@gmail.com>
> wrote:
> >
> > > Attached is a patch.
> > >
> > > Kevin suggested that it'd be a good idea to get the added files from
> the
> > > Caja JAR instead of copying them into the shindig source tree.
> > > He also suggested consolidating and minifying those files in the JAR
> > since
> > > shindig doesn't do runtime minification.
> > >
> > > That's a great idea but I'd like to do that in a separate change. I
> > will
> > > talk to Mike Stay on Caja to make sure the jar contains those files or
> a
> > > minified JS bundle in future versions.
> > >
> > >
> > >
> > > features/caja contains runtime support for Cajoling of gadgets. See
> > > code.google.com/p/google-caja
> > >
> > > DOMita provides a partial fake DOM Level 2 implementation that gates
> > > gadget access to the DOM
> > >
> > > This change adds DOMita and updates the html sanitizer used when the
> > Caja
> > > feature is enabled.
> > >
> > > Some of the functionality in container.js is redundant with domita,
> and
> > is
> > > removed, but none of that functionality should be triggered when the
> > Caja
> > > feature is disabled.
> > >
> > >
> > >
> > >
> > > cheers,
> > > mike
> > >
> >
>
>
>
> --
> ~Kevin
>
Re: Patch to add DOMita to features/caja
Posted by Kevin Brown <et...@google.com>.
I talked with Mike about this on Wednesday. There are a few possibilities:
1. Implement dynamic minification in shindig using Rhino, or possibly even
the caja parser if it makes sense.
2. Have caja packaged to include both debug and minified versions of the
files
3. Keep what we have and be careful about making sure that we always keep
what's checked into shindig up to date with what's in caja.
4. Ignore the issue for now and just assume that by the time we're using
caja across the board, we'll be running our feature javascript through it
anyway and can minify it there.
On Thu, Mar 6, 2008 at 5:18 PM, Bruno Bowden <br...@google.com> wrote:
> Shindig should be able to use Caja in debug mode with non-minified
> versions
> of those added files. I'm not sure of the correct way to do that.
>
> On Thu, Mar 6, 2008 at 5:09 PM, Mike Samuel <mi...@gmail.com> wrote:
>
> > Attached is a patch.
> >
> > Kevin suggested that it'd be a good idea to get the added files from the
> > Caja JAR instead of copying them into the shindig source tree.
> > He also suggested consolidating and minifying those files in the JAR
> since
> > shindig doesn't do runtime minification.
> >
> > That's a great idea but I'd like to do that in a separate change. I
> will
> > talk to Mike Stay on Caja to make sure the jar contains those files or a
> > minified JS bundle in future versions.
> >
> >
> >
> > features/caja contains runtime support for Cajoling of gadgets. See
> > code.google.com/p/google-caja
> >
> > DOMita provides a partial fake DOM Level 2 implementation that gates
> > gadget access to the DOM
> >
> > This change adds DOMita and updates the html sanitizer used when the
> Caja
> > feature is enabled.
> >
> > Some of the functionality in container.js is redundant with domita, and
> is
> > removed, but none of that functionality should be triggered when the
> Caja
> > feature is disabled.
> >
> >
> >
> >
> > cheers,
> > mike
> >
>
--
~Kevin
Re: Patch to add DOMita to features/caja
Posted by Kevin Brown <et...@google.com>.
On Thu, Mar 6, 2008 at 5:29 PM, Mike Samuel <mi...@gmail.com> wrote:
> On 06/03/2008, Bruno Bowden <br...@google.com> wrote:
> >
> > Shindig should be able to use Caja in debug mode with non-minified
> > versions of those added files. I'm not sure of the correct way to do
> that.
>
>
> For debugging or for other reasons as well?
>
> Does shindig have a production vs. development mode switch?
Yes, but it's not quite perfect yet -- passing debug=1 in the iframe urls
(or debug: 1 in the JSON interface) will cause the loaded JS to use the
original source files.
>
>
>
>
>
> On Thu, Mar 6, 2008 at 5:09 PM, Mike Samuel <mi...@gmail.com> wrote:
> >
> > > Attached is a patch.
> > >
> > > Kevin suggested that it'd be a good idea to get the added files from
> the
> > > Caja JAR instead of copying them into the shindig source tree.
> > > He also suggested consolidating and minifying those files in the JAR
> > > since shindig doesn't do runtime minification.
> > >
> > > That's a great idea but I'd like to do that in a separate change. I
> > > will talk to Mike Stay on Caja to make sure the jar contains those
> files or
> > > a minified JS bundle in future versions.
> > >
> > >
> > >
> > > features/caja contains runtime support for Cajoling of gadgets. See
> > > code.google.com/p/google-caja
> > >
> > > DOMita provides a partial fake DOM Level 2 implementation that gates
> > > gadget access to the DOM
> > >
> > > This change adds DOMita and updates the html sanitizer used when the
> > > Caja feature is enabled.
> > >
> > > Some of the functionality in container.js is redundant with domita,
> and
> > > is removed, but none of that functionality should be triggered when
> the Caja
> > > feature is disabled.
> > >
> > >
> > >
> > >
> > > cheers,
> > > mike
> > >
> >
> >
>
--
~Kevin
Re: Patch to add DOMita to features/caja
Posted by Mike Samuel <mi...@gmail.com>.
On 06/03/2008, Bruno Bowden <br...@google.com> wrote:
>
> Shindig should be able to use Caja in debug mode with non-minified
> versions of those added files. I'm not sure of the correct way to do that.
For debugging or for other reasons as well?
Does shindig have a production vs. development mode switch?
On Thu, Mar 6, 2008 at 5:09 PM, Mike Samuel <mi...@gmail.com> wrote:
>
> > Attached is a patch.
> >
> > Kevin suggested that it'd be a good idea to get the added files from the
> > Caja JAR instead of copying them into the shindig source tree.
> > He also suggested consolidating and minifying those files in the JAR
> > since shindig doesn't do runtime minification.
> >
> > That's a great idea but I'd like to do that in a separate change. I
> > will talk to Mike Stay on Caja to make sure the jar contains those files or
> > a minified JS bundle in future versions.
> >
> >
> >
> > features/caja contains runtime support for Cajoling of gadgets. See
> > code.google.com/p/google-caja
> >
> > DOMita provides a partial fake DOM Level 2 implementation that gates
> > gadget access to the DOM
> >
> > This change adds DOMita and updates the html sanitizer used when the
> > Caja feature is enabled.
> >
> > Some of the functionality in container.js is redundant with domita, and
> > is removed, but none of that functionality should be triggered when the Caja
> > feature is disabled.
> >
> >
> >
> >
> > cheers,
> > mike
> >
>
>
Re: Patch to add DOMita to features/caja
Posted by Bruno Bowden <br...@google.com>.
Shindig should be able to use Caja in debug mode with non-minified versions
of those added files. I'm not sure of the correct way to do that.
On Thu, Mar 6, 2008 at 5:09 PM, Mike Samuel <mi...@gmail.com> wrote:
> Attached is a patch.
>
> Kevin suggested that it'd be a good idea to get the added files from the
> Caja JAR instead of copying them into the shindig source tree.
> He also suggested consolidating and minifying those files in the JAR since
> shindig doesn't do runtime minification.
>
> That's a great idea but I'd like to do that in a separate change. I will
> talk to Mike Stay on Caja to make sure the jar contains those files or a
> minified JS bundle in future versions.
>
>
>
> features/caja contains runtime support for Cajoling of gadgets. See
> code.google.com/p/google-caja
>
> DOMita provides a partial fake DOM Level 2 implementation that gates
> gadget access to the DOM
>
> This change adds DOMita and updates the html sanitizer used when the Caja
> feature is enabled.
>
> Some of the functionality in container.js is redundant with domita, and is
> removed, but none of that functionality should be triggered when the Caja
> feature is disabled.
>
>
>
>
> cheers,
> mike
>
Re: Patch to add DOMita to features/caja
Posted by Mike Samuel <mi...@gmail.com>.
It works in a recent version. I tested
var a, b;
at http://cajadores.com/demos/testbed/index.html
I'll ping Mike and see if we need to get you a new build.
mike
On 11/03/2008, Cassie <do...@apache.org> wrote:
>
> Awesome, I've patched this in and submitted it. Unfortunately, I wasn't
> able to do any real testing because it seems like cajoling is broken in
> Shindig. Are you guys aware of this issue?
>
> If I start up the sample container with the default gadget and check "use
> caja". I get this exception:
>
> 2008-03-11 15:15:51.493::WARN: /gadgets/ifr
> java.lang.RuntimeException: Unrecognized node: MultiDeclaration
> at com.google.caja.parser.quasiliteral.AbstractRewriter.expand(
> AbstractRewriter.java:135)
> at com.google.caja.parser.quasiliteral.AbstractRewriter.expandAll(
> AbstractRewriter.java:251)
> at com.google.caja.parser.quasiliteral.DefaultJsRewriter$1.fire(
> DefaultJsRewriter.java:64)
>
> Let me know if you need any more information on how to reproduce the
> issue.
> Thanks!
>
> - Cassie
>
>
> On Mon, Mar 10, 2008 at 11:17 PM, Mike Samuel <mi...@gmail.com>
> wrote:
>
> >
> >
> > On 10/03/2008, Cassie <do...@apache.org> wrote:
> > >
> > >
> > >
> > > On Fri, Mar 7, 2008 at 8:21 PM, Mike Samuel <mi...@gmail.com>
> > > wrote:
> > >
> > > >
> > > >
> > > > On 07/03/2008, Cassie <do...@apache.org> wrote:
> > > > >
> > > > > Mike - looking at the patch I just have one question:
> > > > >
> > > > > - ___.allowCall(outers.opensocial, 'newDataRequest');
> > > > > - ___.allowCall(outers.opensocial, 'newActivity');
> > > > > ...
> > > > >
> > > > > + ___.all2(
> > > > > + ___.allowCall, opensocial.Container.prototype,
> > > > > + ['requestSendMessage', 'requestShareApp',
> > > > > 'requestCreateActivity',
> > > > > + 'hasPermission', 'requestPermission', 'getEnvironment',
> > > > > 'newDataRequest',
> > > > > + 'newActivity', 'newActivityMediaItem', 'newMessage']);
> > > >
> > > >
> > > > Ok. All those functions were available on an opensocial object
> > > > previously.
> > > >
> > > > How is opensocial exposed now?
> > > >
> > >
> > > I don't quite understand. Like I mentioned above the functions are on
> > > the opensocial object (they have always been there). I pasted the code in
> > > the thread which shows how the methods were exposed before. This would be
> > > line 494-504 in the container.js file.
> > >
> > > Hopefully you can tell me how to expose opensocial in the new format,
> > > because I don't know how you are exposing it now :)
> > >
> >
> > Ok, so these are functions attached to opensocial, not
> > Opensocial.container?
> >
> > I tried that initially and got runtime errors. It seems to work now.
> > Maybe that was caused by the breakage that Kevin was talking about.
> >
> > Attached is an updated patch that rolls that back, that removes the, no
> > longer needed, calls to allow Array.sort and Array.push, and that
> > includes an update caja.js.
> >
> > mike
> >
> >
> >
> >
> >
> >
> > - Cassie
> > >
> > >
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The added code there throws the allow call onto the Container
> > > > > class... however, its not the Container class that gadgets use. They just
> > > > > use opensocial.newDataRequest() ie a static function.
> > > > > How do we change that code to reflect that difference?
> > > > >
> > > > > Once we fix that everything else looks fine for a first submit.
> > > > > (and getting the next change from you for pulling from jars will
> > > > > just be added greatness.)
> > > > >
> > > > > - Cassie
> > > > >
> > > > >
> > > > > On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > Attached is a patch.
> > > > > >
> > > > > > Kevin suggested that it'd be a good idea to get the added files
> > > > > > from the Caja JAR instead of copying them into the shindig source tree.
> > > > > > He also suggested consolidating and minifying those files in the
> > > > > > JAR since shindig doesn't do runtime minification.
> > > > > >
> > > > > > That's a great idea but I'd like to do that in a separate
> > > > > > change. I will talk to Mike Stay on Caja to make sure the jar contains
> > > > > > those files or a minified JS bundle in future versions.
> > > > > >
> > > > > >
> > > > > >
> > > > > > features/caja contains runtime support for Cajoling of gadgets.
> > > > > > See code.google.com/p/google-caja
> > > > > >
> > > > > > DOMita provides a partial fake DOM Level 2 implementation that
> > > > > > gates gadget access to the DOM
> > > > > >
> > > > > > This change adds DOMita and updates the html sanitizer used when
> > > > > > the Caja feature is enabled.
> > > > > >
> > > > > > Some of the functionality in container.js is redundant with
> > > > > > domita, and is removed, but none of that functionality should be triggered
> > > > > > when the Caja feature is disabled.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > cheers,
> > > > > > mike
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
Re: Patch to add DOMita to features/caja
Posted by Cassie <do...@apache.org>.
Awesome, I've patched this in and submitted it. Unfortunately, I wasn't able
to do any real testing because it seems like cajoling is broken in Shindig.
Are you guys aware of this issue?
If I start up the sample container with the default gadget and check "use
caja". I get this exception:
2008-03-11 15:15:51.493::WARN: /gadgets/ifr
java.lang.RuntimeException: Unrecognized node: MultiDeclaration
at
com.google.caja.parser.quasiliteral.AbstractRewriter.expand(AbstractRewriter.java:135)
at
com.google.caja.parser.quasiliteral.AbstractRewriter.expandAll(AbstractRewriter.java:251)
at
com.google.caja.parser.quasiliteral.DefaultJsRewriter$1.fire(DefaultJsRewriter.java:64)
Let me know if you need any more information on how to reproduce the issue.
Thanks!
- Cassie
On Mon, Mar 10, 2008 at 11:17 PM, Mike Samuel <mi...@gmail.com> wrote:
>
>
> On 10/03/2008, Cassie <do...@apache.org> wrote:
> >
> >
> >
> > On Fri, Mar 7, 2008 at 8:21 PM, Mike Samuel <mi...@gmail.com>
> > wrote:
> >
> > >
> > >
> > > On 07/03/2008, Cassie <do...@apache.org> wrote:
> > > >
> > > > Mike - looking at the patch I just have one question:
> > > >
> > > > - ___.allowCall(outers.opensocial, 'newDataRequest');
> > > > - ___.allowCall(outers.opensocial, 'newActivity');
> > > > ...
> > > >
> > > > + ___.all2(
> > > > + ___.allowCall, opensocial.Container.prototype,
> > > > + ['requestSendMessage', 'requestShareApp',
> > > > 'requestCreateActivity',
> > > > + 'hasPermission', 'requestPermission', 'getEnvironment',
> > > > 'newDataRequest',
> > > > + 'newActivity', 'newActivityMediaItem', 'newMessage']);
> > >
> > >
> > > Ok. All those functions were available on an opensocial object
> > > previously.
> > >
> > > How is opensocial exposed now?
> > >
> >
> > I don't quite understand. Like I mentioned above the functions are on
> > the opensocial object (they have always been there). I pasted the code in
> > the thread which shows how the methods were exposed before. This would be
> > line 494-504 in the container.js file.
> >
> > Hopefully you can tell me how to expose opensocial in the new format,
> > because I don't know how you are exposing it now :)
> >
>
> Ok, so these are functions attached to opensocial, not
> Opensocial.container?
>
> I tried that initially and got runtime errors. It seems to work now.
> Maybe that was caused by the breakage that Kevin was talking about.
>
> Attached is an updated patch that rolls that back, that removes the, no
> longer needed, calls to allow Array.sort and Array.push, and that includes
> an update caja.js.
>
> mike
>
>
>
>
>
>
> - Cassie
> >
> >
> >
> > >
> > >
> > >
> > >
> > >
> > > The added code there throws the allow call onto the Container class...
> > > > however, its not the Container class that gadgets use. They just use
> > > > opensocial.newDataRequest() ie a static function.
> > > > How do we change that code to reflect that difference?
> > > >
> > > > Once we fix that everything else looks fine for a first submit.
> > > > (and getting the next change from you for pulling from jars will
> > > > just be added greatness.)
> > > >
> > > > - Cassie
> > > >
> > > >
> > > > On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com>
> > > > wrote:
> > > >
> > > > > Attached is a patch.
> > > > >
> > > > > Kevin suggested that it'd be a good idea to get the added files
> > > > > from the Caja JAR instead of copying them into the shindig source tree.
> > > > > He also suggested consolidating and minifying those files in the
> > > > > JAR since shindig doesn't do runtime minification.
> > > > >
> > > > > That's a great idea but I'd like to do that in a separate change.
> > > > > I will talk to Mike Stay on Caja to make sure the jar contains those files
> > > > > or a minified JS bundle in future versions.
> > > > >
> > > > >
> > > > >
> > > > > features/caja contains runtime support for Cajoling of gadgets.
> > > > > See code.google.com/p/google-caja
> > > > >
> > > > > DOMita provides a partial fake DOM Level 2 implementation that
> > > > > gates gadget access to the DOM
> > > > >
> > > > > This change adds DOMita and updates the html sanitizer used when
> > > > > the Caja feature is enabled.
> > > > >
> > > > > Some of the functionality in container.js is redundant with
> > > > > domita, and is removed, but none of that functionality should be triggered
> > > > > when the Caja feature is disabled.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > cheers,
> > > > > mike
> > > > >
> > > >
> > > >
> > >
> >
>
Re: Patch to add DOMita to features/caja
Posted by Mike Samuel <mi...@gmail.com>.
On 10/03/2008, Cassie <do...@apache.org> wrote:
>
>
>
> On Fri, Mar 7, 2008 at 8:21 PM, Mike Samuel <mi...@gmail.com> wrote:
>
> >
> >
> > On 07/03/2008, Cassie <do...@apache.org> wrote:
> > >
> > > Mike - looking at the patch I just have one question:
> > >
> > > - ___.allowCall(outers.opensocial, 'newDataRequest');
> > > - ___.allowCall(outers.opensocial, 'newActivity');
> > > ...
> > >
> > > + ___.all2(
> > > + ___.allowCall, opensocial.Container.prototype,
> > > + ['requestSendMessage', 'requestShareApp',
> > > 'requestCreateActivity',
> > > + 'hasPermission', 'requestPermission', 'getEnvironment',
> > > 'newDataRequest',
> > > + 'newActivity', 'newActivityMediaItem', 'newMessage']);
> >
> >
> > Ok. All those functions were available on an opensocial object
> > previously.
> >
> > How is opensocial exposed now?
> >
>
> I don't quite understand. Like I mentioned above the functions are on the
> opensocial object (they have always been there). I pasted the code in the
> thread which shows how the methods were exposed before. This would be line
> 494-504 in the container.js file.
>
> Hopefully you can tell me how to expose opensocial in the new format,
> because I don't know how you are exposing it now :)
>
Ok, so these are functions attached to opensocial, not Opensocial.container?
I tried that initially and got runtime errors. It seems to work now. Maybe
that was caused by the breakage that Kevin was talking about.
Attached is an updated patch that rolls that back, that removes the, no
longer needed, calls to allow Array.sort and Array.push, and that includes
an update caja.js.
mike
- Cassie
>
>
>
> >
> >
> >
> >
> >
> > The added code there throws the allow call onto the Container class...
> > > however, its not the Container class that gadgets use. They just use
> > > opensocial.newDataRequest() ie a static function.
> > > How do we change that code to reflect that difference?
> > >
> > > Once we fix that everything else looks fine for a first submit.
> > > (and getting the next change from you for pulling from jars will just
> > > be added greatness.)
> > >
> > > - Cassie
> > >
> > >
> > > On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com>
> > > wrote:
> > >
> > > > Attached is a patch.
> > > >
> > > > Kevin suggested that it'd be a good idea to get the added files from
> > > > the Caja JAR instead of copying them into the shindig source tree.
> > > > He also suggested consolidating and minifying those files in the JAR
> > > > since shindig doesn't do runtime minification.
> > > >
> > > > That's a great idea but I'd like to do that in a separate change. I
> > > > will talk to Mike Stay on Caja to make sure the jar contains those files or
> > > > a minified JS bundle in future versions.
> > > >
> > > >
> > > >
> > > > features/caja contains runtime support for Cajoling of gadgets. See
> > > > code.google.com/p/google-caja
> > > >
> > > > DOMita provides a partial fake DOM Level 2 implementation that gates
> > > > gadget access to the DOM
> > > >
> > > > This change adds DOMita and updates the html sanitizer used when the
> > > > Caja feature is enabled.
> > > >
> > > > Some of the functionality in container.js is redundant with domita,
> > > > and is removed, but none of that functionality should be triggered when the
> > > > Caja feature is disabled.
> > > >
> > > >
> > > >
> > > >
> > > > cheers,
> > > > mike
> > > >
> > >
> > >
> >
>
Re: Patch to add DOMita to features/caja
Posted by Cassie <do...@apache.org>.
On Fri, Mar 7, 2008 at 8:21 PM, Mike Samuel <mi...@gmail.com> wrote:
>
>
> On 07/03/2008, Cassie <do...@apache.org> wrote:
> >
> > Mike - looking at the patch I just have one question:
> >
> > - ___.allowCall(outers.opensocial, 'newDataRequest');
> > - ___.allowCall(outers.opensocial, 'newActivity');
> > ...
> >
> > + ___.all2(
> > + ___.allowCall, opensocial.Container.prototype,
> > + ['requestSendMessage', 'requestShareApp',
> > 'requestCreateActivity',
> > + 'hasPermission', 'requestPermission', 'getEnvironment',
> > 'newDataRequest',
> > + 'newActivity', 'newActivityMediaItem', 'newMessage']);
>
>
> Ok. All those functions were available on an opensocial object
> previously.
>
> How is opensocial exposed now?
>
I don't quite understand. Like I mentioned above the functions are on the
opensocial object (they have always been there). I pasted the code in the
thread which shows how the methods were exposed before. This would be line
494-504 in the container.js file.
Hopefully you can tell me how to expose opensocial in the new format,
because I don't know how you are exposing it now :)
- Cassie
>
>
>
>
>
> The added code there throws the allow call onto the Container class...
> > however, its not the Container class that gadgets use. They just use
> > opensocial.newDataRequest() ie a static function.
> > How do we change that code to reflect that difference?
> >
> > Once we fix that everything else looks fine for a first submit.
> > (and getting the next change from you for pulling from jars will just be
> > added greatness.)
> >
> > - Cassie
> >
> >
> > On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com>
> > wrote:
> >
> > > Attached is a patch.
> > >
> > > Kevin suggested that it'd be a good idea to get the added files from
> > > the Caja JAR instead of copying them into the shindig source tree.
> > > He also suggested consolidating and minifying those files in the JAR
> > > since shindig doesn't do runtime minification.
> > >
> > > That's a great idea but I'd like to do that in a separate change. I
> > > will talk to Mike Stay on Caja to make sure the jar contains those files or
> > > a minified JS bundle in future versions.
> > >
> > >
> > >
> > > features/caja contains runtime support for Cajoling of gadgets. See
> > > code.google.com/p/google-caja
> > >
> > > DOMita provides a partial fake DOM Level 2 implementation that gates
> > > gadget access to the DOM
> > >
> > > This change adds DOMita and updates the html sanitizer used when the
> > > Caja feature is enabled.
> > >
> > > Some of the functionality in container.js is redundant with domita,
> > > and is removed, but none of that functionality should be triggered when the
> > > Caja feature is disabled.
> > >
> > >
> > >
> > >
> > > cheers,
> > > mike
> > >
> >
> >
>
Re: Patch to add DOMita to features/caja
Posted by Mike Samuel <mi...@gmail.com>.
On 07/03/2008, Cassie <do...@apache.org> wrote:
>
> Mike - looking at the patch I just have one question:
>
> - ___.allowCall(outers.opensocial, 'newDataRequest');
> - ___.allowCall(outers.opensocial, 'newActivity');
> ...
>
> + ___.all2(
> + ___.allowCall, opensocial.Container.prototype,
> + ['requestSendMessage', 'requestShareApp', 'requestCreateActivity',
> + 'hasPermission', 'requestPermission', 'getEnvironment',
> 'newDataRequest',
> + 'newActivity', 'newActivityMediaItem', 'newMessage']);
Ok. All those functions were available on an opensocial object previously.
How is opensocial exposed now?
The added code there throws the allow call onto the Container class...
> however, its not the Container class that gadgets use. They just use
> opensocial.newDataRequest() ie a static function.
> How do we change that code to reflect that difference?
>
> Once we fix that everything else looks fine for a first submit.
> (and getting the next change from you for pulling from jars will just be
> added greatness.)
>
> - Cassie
>
>
> On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com> wrote:
>
> > Attached is a patch.
> >
> > Kevin suggested that it'd be a good idea to get the added files from the
> > Caja JAR instead of copying them into the shindig source tree.
> > He also suggested consolidating and minifying those files in the JAR
> > since shindig doesn't do runtime minification.
> >
> > That's a great idea but I'd like to do that in a separate change. I
> > will talk to Mike Stay on Caja to make sure the jar contains those files or
> > a minified JS bundle in future versions.
> >
> >
> >
> > features/caja contains runtime support for Cajoling of gadgets. See
> > code.google.com/p/google-caja
> >
> > DOMita provides a partial fake DOM Level 2 implementation that gates
> > gadget access to the DOM
> >
> > This change adds DOMita and updates the html sanitizer used when the
> > Caja feature is enabled.
> >
> > Some of the functionality in container.js is redundant with domita, and
> > is removed, but none of that functionality should be triggered when the Caja
> > feature is disabled.
> >
> >
> >
> >
> > cheers,
> > mike
> >
>
>
Re: Patch to add DOMita to features/caja
Posted by Cassie <do...@apache.org>.
Mike - looking at the patch I just have one question:
- ___.allowCall(outers.opensocial, 'newDataRequest');
- ___.allowCall(outers.opensocial, 'newActivity');
...
+ ___.all2(
+ ___.allowCall, opensocial.Container.prototype,
+ ['requestSendMessage', 'requestShareApp', 'requestCreateActivity',
+ 'hasPermission', 'requestPermission', 'getEnvironment',
'newDataRequest',
+ 'newActivity', 'newActivityMediaItem', 'newMessage']);
The added code there throws the allow call onto the Container class...
however, its not the Container class that gadgets use. They just use
opensocial.newDataRequest() ie a static function.
How do we change that code to reflect that difference?
Once we fix that everything else looks fine for a first submit.
(and getting the next change from you for pulling from jars will just be
added greatness.)
- Cassie
On Fri, Mar 7, 2008 at 2:09 AM, Mike Samuel <mi...@gmail.com> wrote:
> Attached is a patch.
>
> Kevin suggested that it'd be a good idea to get the added files from the
> Caja JAR instead of copying them into the shindig source tree.
> He also suggested consolidating and minifying those files in the JAR since
> shindig doesn't do runtime minification.
>
> That's a great idea but I'd like to do that in a separate change. I will
> talk to Mike Stay on Caja to make sure the jar contains those files or a
> minified JS bundle in future versions.
>
>
>
> features/caja contains runtime support for Cajoling of gadgets. See
> code.google.com/p/google-caja
>
> DOMita provides a partial fake DOM Level 2 implementation that gates
> gadget access to the DOM
>
> This change adds DOMita and updates the html sanitizer used when the Caja
> feature is enabled.
>
> Some of the functionality in container.js is redundant with domita, and is
> removed, but none of that functionality should be triggered when the Caja
> feature is disabled.
>
>
>
>
> cheers,
> mike
>