Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Channels.installTo now takes an array of objects.
  • Loading branch information
ryanflorence committed Oct 25, 2010
1 parent 9ac4aa9 commit 56095df
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Demos/demo.js
@@ -1,5 +1,5 @@
// if creating your own class, just use Implements: [Events, Channels]
Fx.implement(Channels.prototype);
Channels.installTo(Fx);

window.addEvent('domready', function(){

Expand Down
4 changes: 4 additions & 0 deletions Source/Channels.js
Expand Up @@ -58,6 +58,10 @@ Object.append(Channels, {
});
},
installTo: function(obj){
if (typeOf(obj) === 'array'){
obj.each(function(item){ Channels.installTo(item); }, this);
return;
}
obj.implement(methods);
}
});
Expand Down
6 changes: 1 addition & 5 deletions Source/Element.Channels.js
Expand Up @@ -20,8 +20,4 @@ provides: [Element.Channels]
...
*/

[Window, Document, Element].each(function(item){
Channels.installTo(item);
});


Channels.installTo([Window, Document, Element]);
2 changes: 1 addition & 1 deletion Tests/Channels/Channels.html
Expand Up @@ -17,7 +17,7 @@
<script src="/depender/build?require=Channels/Element.Channels,Core/Fx.Tween"></script>

<script>
Fx.implement(Channels.prototype);
Channels.installTo(Fx);

var fixture = $('fixture').subscribe({
'/fx/start': function(){
Expand Down

0 comments on commit 56095df

Please sign in to comment.