Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/arian/mootools-core
Browse files Browse the repository at this point in the history
  • Loading branch information
kamicane committed May 14, 2010
2 parents cb9f732 + 99a3cc3 commit f9d6c05
Show file tree
Hide file tree
Showing 15 changed files with 525 additions and 1,053 deletions.
29 changes: 17 additions & 12 deletions Docs/Browser/Browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ Some browser properties are attached to the Browser Object for browser and platf

* Browser.Request - (*object*) The XMLHTTP object or equivalent.

### Engine:

* Browser.Engine.trident - (*boolean*) True if the current browser uses the trident engine (e.g. Internet Explorer).
* Browser.Engine.gecko - (*boolean*) True if the current browser uses the gecko engine (e.g. Firefox, or any Mozilla Browser).
* Browser.Engine.webkit - (*boolean*) True if the current browser uses the webkit engine (e.g. Safari, Google Chrome, Konqueror).
* Browser.Engine.presto - (*boolean*) True if the current browser uses the presto engine (e.g. Opera 9).
* Browser.Engine.name - (*string*) The name of the engine.
* Browser.Engine.version - (*number*) The version of the engine. (e.g. 950)
* Browser.Plugins.Flash.version - (*number*) The major version of the flash plugin installed.
* Browser.Plugins.Flash.build - (*number*) The build version of the flash plugin installed.

### Name:

* Browser.ie - (*boolean*) True if the current browser is Internet Explorer.
Expand All @@ -51,4 +40,20 @@ Some browser properties are attached to the Browser Object for browser and platf

### Plugins:

* Browser.Plugins.Flash - (*boolean*) - True if Flash is present.
* Browser.Plugins.Flash - (*boolean*) - True if Flash is present.

Deprecated
----------

The *Browser.Engine* object is deprecated since MooTools 1.3.

### Engine:

* Browser.Engine.trident - (*boolean*) True if the current browser uses the trident engine (e.g. Internet Explorer).
* Browser.Engine.gecko - (*boolean*) True if the current browser uses the gecko engine (e.g. Firefox, or any Mozilla Browser).
* Browser.Engine.webkit - (*boolean*) True if the current browser uses the webkit engine (e.g. Safari, Google Chrome, Konqueror).
* Browser.Engine.presto - (*boolean*) True if the current browser uses the presto engine (e.g. Opera 9).
* Browser.Engine.name - (*string*) The name of the engine.
* Browser.Engine.version - (*number*) The version of the engine. (e.g. 950)
* Browser.Plugins.Flash.version - (*number*) The major version of the flash plugin installed.
* Browser.Plugins.Flash.build - (*number*) The build version of the flash plugin installed.
2 changes: 1 addition & 1 deletion Docs/Class/Class.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Native: Class {#Class}
Class {#Class}
======================

The base Class of the [MooTools](http://mootools.net/) framework.
Expand Down
46 changes: 23 additions & 23 deletions Docs/Core/Core.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Core contains a handful of common sense functions used in [MooTools](http://moot



Function: typeOf {#typeOf}
Function: typeOf {#Core:typeOf}
--------------------------

Returns the type of object that matches the item passed in.
Expand Down Expand Up @@ -50,7 +50,7 @@ This method is equivalent to *$type* from MooTools 1.2.



Function: instanceOf {#instanceOf}
Function: instanceOf {#Core:instanceOf}
----------------------------------

Checks to see if an object is an instance of a particular Type.
Expand Down Expand Up @@ -80,7 +80,7 @@ Checks to see if an object is an instance of a particular Type.



Function: Object.each {#Object-each}
Function: Object.each {#Object:Object-each}
------------------------------------

Used to iterate through an object.
Expand Down Expand Up @@ -120,7 +120,7 @@ This method is an object-specific equivalent of *$each* from MooTools 1.2.



Function: Object.merge {#Object-merge}
Function: Object.merge {#Object:Object-merge}
--------------------------------------

Merges any number of objects recursively without referencing them or their sub-objects.
Expand Down Expand Up @@ -154,7 +154,7 @@ This method is an object-specific equivalent of *$merge* from MooTools 1.2.



Function: Object.clone {#Object-clone}
Function: Object.clone {#Object:Object-clone}
--------------------------------------

Returns a copy of an object.
Expand Down Expand Up @@ -186,7 +186,7 @@ This is an object-specific equivalent of *$unlink* from MooTools 1.2.



Function: Object.append {#Object-append}
Function: Object.append {#Object:Object-append}
----------------------------------------

Copies all the properties from the second object passed in to the first object passed in.
Expand Down Expand Up @@ -223,7 +223,7 @@ Copies all the properties from the second object passed in to the first object p
This method is an object-specific equivalent of *$extend* from MooTools 1.2.


Function method: extend {#extend}
Function method: extend {#Function:extend}
---------------------------------

Add methods to a function
Expand All @@ -246,7 +246,7 @@ Add methods to a function
myFunction.alert('Hello!'); // Alerts Hello!


Function method: implement {#implement}
Function method: implement {#Function:implement}
---------------------------------------

Add methods to the prototype
Expand Down Expand Up @@ -279,7 +279,7 @@ Deprecated Functions {#Deprecated-Functions}
============================================


Function: $chk {#chk}
Function: $chk {#Deprecated-Functions:chk}
---------------------

This method has been deprecated and will have no equivalent in MooTools 2.0.
Expand All @@ -294,7 +294,7 @@ If you really need this function you can implement it like so:



Function: $clear {#clear}
Function: $clear {#Deprecated-Functions:clear}
-------------------------

This method has been deprecated. Please use *clearInterval* or *clearTimeout* instead.
Expand All @@ -304,7 +304,7 @@ This method has been deprecated. Please use *clearInterval* or *clearTimeout* in
- [MDC clearTimeout][], [MDC clearInterval][]


Function: $defined {#defined}
Function: $defined {#Deprecated-Functions:defined}
-----------------------------

This method has been deprecated.
Expand All @@ -323,7 +323,7 @@ If you really need this function you can implement it like so:
}


Function: $arguments {#arguments}
Function: $arguments {#Deprecated-Functions:arguments}
---------------------------------

This method has been deprecated and will have no equivalent in MooTools 2.0.
Expand All @@ -340,7 +340,7 @@ If you really need this function you can implement it like so:



Function: $empty {#empty}
Function: $empty {#Deprecated-Functions:empty}
-------------------------

This method has been deprecated. Use [Function.from](/core/Types/Function/#Function-from) instead.
Expand All @@ -353,7 +353,7 @@ This method has been deprecated. Use [Function.from](/core/Types/Function/#Funct



Function: $lambda {#lambda}
Function: $lambda {#Deprecated-Functions:lambda}
---------------------------

This method has been deprecated. Use [Function.from](/core/Types/Function/#Function-from) instead.
Expand All @@ -364,49 +364,49 @@ This method has been deprecated. Use [Function.from](/core/Types/Function/#Funct



Function: $extend {#extend}
Function: $extend {#Deprecated-Functions:extend}
---------------------------

This method has been deprecated. Please use [Object.append](#Object-append) instead.



Function: $merge {#merge}
Function: $merge {#Deprecated-Functions:merge}
-------------------------

This method has been deprecated. Please use [Object.merge](#Object-merge) instead.



Function: $each {#each}
Function: $each {#Deprecated-Functions:each}
-----------------------

This method has been deprecated. Please use [Array.each](/core/Types/Array/#Array-each) or [Object.each](#Object-each) instead.



Function: $pick {#pick}
Function: $pick {#Deprecated-Functions:pick}
-----------------------

This method has been deprecated. Please use [Array.pick](/core/Types/Array/#pick) instead.



Function: $random {#random}
Function: $random {#Deprecated-Functions:random}
---------------------------

This method has been deprecated. Please use [Number.random](/core/Types/Number/#Number-random) instead.



Function: $splat {#splat}
Function: $splat {#Deprecated-Functions:splat}
-------------------------

This method has been deprecated. Please use [Array.from](/core/Types/Array/#Array-from) instead.



Function: $time {#time}
Function: $time {#Deprecated-Functions:time}
-----------------------

This method has been deprecated. Please use *Date.now()* instead.
Expand All @@ -421,14 +421,14 @@ This method has been deprecated. Please use *Date.now()* instead.



Function: $try {#try}
Function: $try {#Deprecated-Functions:try}
---------------------

This method has been deprecated. Please use [Function.attempt](/core/Types/Function/#Function-attempt) instead.



Function: $type {#type}
Function: $type {#Deprecated-Functions:type}
-----------------------

This method has been deprecated. Please use [typeOf](#typeOf) instead.
Expand Down
2 changes: 1 addition & 1 deletion Docs/Element/Element.Dimensions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Native: Element {#Element}
Element {#Element}
==========================

Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].
Expand Down
62 changes: 51 additions & 11 deletions Docs/Element/Element.Event.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Native: Element {#Element}
Element {#Element}
==========================

- Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].
Expand Down Expand Up @@ -273,10 +273,50 @@ The Element.Events.yourproperty (object) can have:
If you use the condition option you NEED to specify a base type, unless you plan to overwrite a native event.
(highly unrecommended: use only when you know exactly what you're doing).

Custom Events
-------------

### Event: mouseenter

Element.Events {#Element-Events}
=================================

This object contains custom events. There are several build-in events like
mouseenter or mousewheel, but you can define your own events as well.

### Adding a Custom Element Event

Element.Events.outerClick = {
base : 'click',
condition : function(event){
event.stopPropagation();
return false;
},
onAdd : function(fn){
this.getDocument().addEvent('click', fn);
},
onRemove : function(fn){
this.getDocument().removeEvent('click', fn);
}
};

### Using a Custom Element Event

myElement.addEvent('outerClick',function(){
alert('You clicked outside this element');
});

myElement.removeEvent('outerClick',fn);



Build in Custom Events
-----------------------


### Event: mouseenter {#Element-Events:mouseenter}

This event fires when the mouse enters the area of the DOM Element and will not be fired again if the mouse crosses over children of the Element (unlike mouseover).

Expand All @@ -288,7 +328,7 @@ This event fires when the mouse enters the area of the DOM Element and will not

- [Element:addEvent](#Element:addEvent)

### Event: mouseleave
### Event: mouseleave {#Element-Events:mouseleave}

This event fires when the mouse leaves the area of the DOM Element and will not be fired if the mouse crosses over children of the Element (unlike mouseout).

Expand All @@ -300,7 +340,7 @@ This event fires when the mouse leaves the area of the DOM Element and will not

- [Element:addEvent](#Element:addEvent)

### Event: mousewheel
### Event: mousewheel {#Element-Events:mousewheel}

This event fires when the mouse wheel is rotated;

Expand All @@ -318,8 +358,8 @@ This event fires when the mouse wheel is rotated;



[$]: /core/Element/#dollar
[Function]: /core/Native/Function
[Function:bind]: /core/Native/Function/#Function:bind
[Function:pass]: /core/Native/Function/#Function:pass
[Function:delay]: /core/Native/Function/#Function:delay
[$]: /core/Element/Element#dollar
[Function]: /core/Types/Function
[Function:bind]: /core/Types/Function/#bind
[Function:pass]: /core/Types/Function/#pass
[Function:delay]: /core/Types/Function/#delay
2 changes: 1 addition & 1 deletion Docs/Element/Element.Style.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Native: Element {#Element}
Element {#Element}
==========================

Custom Native to allow all of its methods to be used with any DOM element via the dollar function [$][].
Expand Down
6 changes: 3 additions & 3 deletions Docs/Element/Element.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Native: Window {#Window}
Window {#Window}
========================

The following functions are treated as Window methods.
Expand Down Expand Up @@ -95,7 +95,7 @@ Selects and extends DOM elements. Elements arrays returned with $$ will also acc



Native: Element {#Element}
Element {#Element}
==========================

Custom Native to allow all of its methods to be used with any extended DOM Element.
Expand Down Expand Up @@ -1471,7 +1471,7 @@ Eliminates a key from the Elements storage.



Hash: Element.Properties {#Element-Properties}
Object: Element.Properties {#Element-Properties}
==============================================

This Hash contains the functions that respond to the first argument passed in [Element:get][], [Element:set][] and [Element:erase][].
Expand Down
Loading

0 comments on commit f9d6c05

Please sign in to comment.