Permalink
Browse files

Trailing whitepace police

  • Loading branch information...
arian committed Aug 21, 2012
1 parent 205df1b commit c5cae2ac796e6a71215581ec66df99879800a8b8
View
@@ -640,9 +640,9 @@ Inserts the passed element(s) inside the Element (which will then become the par
var mySecondElement = new Element('p#second');
var myThirdElement = new Element('ul#third');
var myFourthElement = new Element('a#fourth');
-
+
var myParentElement = new Element('div#parent');
-
+
myFirstElement.adopt(mySecondElement);
mySecondElement.adopt(myThirdElement, myFourthElement);
myParentElement.adopt([myFirstElement, new Element('span#another')]);
@@ -1427,7 +1427,7 @@ Sets an attribute or special property for this Element.
- use 'class', not 'className'
- use 'frameborder', not 'frameBorder'
- etc.
-- When setting the `src` property for an image file, be sure to remove the `width` and `height` attribute (use `Element.removeAttribute`). IE7, and less, set and freeze the `width` and `height` of an image if previously specified.
+- When setting the `src` property for an image file, be sure to remove the `width` and `height` attribute (use `Element.removeAttribute`). IE7, and less, set and freeze the `width` and `height` of an image if previously specified.
Element Method: setProperties {#Element:setProperties}
------------------------------------------------------
@@ -176,4 +176,4 @@ Updates the content of the Element with a Request.HTML GET request.
[Request]: /core/Request/Request
[$]: /core/Element/Element/#Window:dollar
[Element.Properties]: /core/Element/Element/#Element-Properties
-[Elements:filter]: /core/Element/Element#Elements:filter
+[Elements:filter]: /core/Element/Element#Elements:filter
View
@@ -240,7 +240,7 @@ Nth Expression:
* nExpression - (string) A nth expression for the "every" nth-child.
### Examples:
-
+
<span id="i1"></span>
<span id="i2"></span>
<span id="i3"></span>
@@ -252,7 +252,7 @@ Nth Expression:
$$(':nth-last-child(2n)'); //Returns Elements #i2 and #i4.
$$(':nth-last-child(2n+1)') //Returns Elements #i1, #i3 and #i5.
-
+
$$(':nth-last-child(3n+2)') //Returns Elements #i1 and #i4.
Every Odd Child (same as 2n+1):
View
@@ -397,4 +397,4 @@ Strips the String of its *<script>* tags and anything in between them.
[MDC Array]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array
[String:trim]: #String:trim
[Array:rgbToHex]: /core/Types/Array/#Array:rgbToHex
-[String:trim]: #String:trim
+[String:trim]: #String:trim
@@ -37,4 +37,4 @@ describe('Window', {
expect($defined(window.Element.prototype)).toBeTruthy();
}
-});
+});
View
@@ -240,7 +240,7 @@ describe('$time', {
'should return a timestamp': function(){
expect(Number.type($time())).toBeTruthy();
},
-
+
'should be within a reasonable range': function(){
expect($time() < 1e13 && $time() > 1e12).toBeTruthy();
}
@@ -318,7 +318,7 @@ describe('$type', {
expect(type == 'array' || type == 'arguments').toBeTruthy();
return;
}
-
+
expect($type(arguments)).toEqual('arguments');
},
@@ -338,11 +338,11 @@ describe('$type', {
var div = document.createElement('div');
expect($type(div)).toEqual('element');
},
-
+
"should return 'array' for Elements": function(){
expect($type(new Elements)).toEqual('array');
},
-
+
"should return 'window' for the window object": function(){
expect($type(window)).toEqual('window');
},
View
@@ -66,4 +66,4 @@ describe('Native (private)', {
});
-})();
+})();
@@ -28,7 +28,7 @@ describe('Element.Dimensions', function(){
zIndex: 1
}
}).inject($(document.body));
-
+
relDiv = new Element('div', {
styles: {
width: 50,
@@ -43,7 +43,7 @@ describe('Element.Dimensions', function(){
'display': 'inline'
}
}).inject(div);
-
+
absDiv = new Element('div', {
styles: {
width: 10,
@@ -58,7 +58,7 @@ describe('Element.Dimensions', function(){
overflow: 'hidden'
}
}).inject(relDiv);
-
+
scrollDiv = new Element('div', {
styles: {
width: 100,
@@ -70,7 +70,7 @@ describe('Element.Dimensions', function(){
left: 0
}
}).inject($(document.body));
-
+
tallDiv = new Element('div', {
styles: {
width: 200,
@@ -81,50 +81,50 @@ describe('Element.Dimensions', function(){
});
describe('Element.getSize', function(){
-
+
it('should measure the width and height of the element', function(){
expect(div.getSize().x).toEqual(108);
expect(div.getSize().y).toEqual(108);
});
-
+
});
-
+
describe('Element.getPosition', function(){
-
+
it('should measure the x and y position of the element', function(){
expect(div.getPosition()).toEqual({x: 102, y: 102});
});
-
+
it('should measure the x and y position of the element relative to another', function(){
expect(relDiv.getPosition(div)).toEqual({x: 8, y: 8});
});
-
+
});
describe('Element.getCoordinates', function(){
-
+
it('should return the coordinates relative to parent', function(){
expect(absDiv.getCoordinates(relDiv)).toEqual({left:15, top:15, width:22, height:22, right:37, bottom:37});
});
-
+
});
-
+
describe('Element.getScrollSize', function(){
-
+
it('should return the scrollSize', function(){
expect(scrollDiv.getScrollSize()).toEqual({x:200, y:200});
});
-
+
});
-
+
describe('Element.scrollTo', function(){
-
+
it('should scroll the element', function(){
expect(scrollDiv.scrollTo(20, 20).getScroll()).toEqual({x:20, y:20});
});
-
+
});
-
+
afterEach(function(){
[div, relDiv, absDiv, scrollDiv, tallDiv].each(function(el){
$(el).destroy();
@@ -84,4 +84,4 @@ describe('Element.setStyles', {
expect(new Element('div').setStyles({'list-style-type':'square', 'color':'#00ff00'}).getStyles('list-style-type', 'color')).toEqual({'list-style-type':'square', color:'#00ff00'});
}
-});
+});
@@ -7,11 +7,11 @@ License:
*/
describe('Cookie', {
-
+
"should set a cookie": function(){
Cookie.write('test', 1);
-
-
+
+
}
-
-});
+
+});
@@ -263,7 +263,7 @@ describe('Class toString', function(){
var Italian = new Class({
Extends: Person,
-
+
toString: function(){
return "It's me, " + this.name;
}
@@ -277,4 +277,4 @@ describe('Class toString', function(){
});
-})();
+})();
@@ -7,7 +7,7 @@ provides: [Array.Specs]
...
*/
(function(){
-
+
var getTestArray = function(){
var a = [0, 1, 2, 3];
delete a[1];
@@ -41,14 +41,14 @@ describe("Array Methods 1.3", {
var arr = array.concat([false, null, 4]).filter(Type.isNumber);
expect(arr).toEqual(array.concat(4));
},
-
+
'filter should skip deleted elements': function(){
var i = 0;
getTestArray().filter(function(){
i++;
return true;
});
-
+
expect(i).toEqual(2);
},
@@ -75,25 +75,25 @@ describe("Array Methods 1.3", {
getTestArray().map(function(){
return i++;
});
-
+
expect(i).toEqual(2);
},
-
+
// Array.every
'should return true if every item matches the comparator, otherwise false': function(){
expect([1,2,3,0,0,0].every(Type.isNumber)).toBeTruthy();
expect(['1',2,3,0].every(Type.isNumber)).toBeFalsy();
},
-
+
'every should skip deleted elements': function(){
var i = 0;
getTestArray().every(function(){
i++;
return true;
});
-
+
expect(i).toEqual(2);
},
@@ -104,18 +104,18 @@ describe("Array Methods 1.3", {
expect([1,2,3,0,0,0].map(String).some(Type.isNumber)).toBeFalsy();
},
-
+
'some should skip deleted elements': function(){
var i = 0;
var a = getTestArray();
delete a[0];
-
+
// skips the first three elements
a.some(function(value, index){
i = index;
return true;
});
-
+
expect(i).toEqual(3);
},
@@ -268,4 +268,4 @@ describe('Array.pick', function(){
});
-})();
+})();
@@ -125,4 +125,4 @@ describe('Object.getLength', function(){
});
-})();
+})();
@@ -12,4 +12,4 @@ sources:
- "Types/Function.js"
- "Types/Object.js"
- "Class/Class.js"
- - "Fx/Fx.js"
+ - "Fx/Fx.js"
@@ -12,9 +12,9 @@ describe('Browser', {
'should think it is executed in a browser': function(){
expect(Browser.ie || Browser.safari || Browser.chrome || Browser.firefox || Browser.opera).toEqual(true);
},
-
+
'should assume the IE version is emulated by the documentMode (X-UA-Compatible)': function(){
if (Browser.ie && document.documentMode) expect(Browser.version).toEqual(document.documentMode);
}
-});
+});
@@ -180,4 +180,4 @@ runEventSpecs('element', function(){
return new Element('div');
});
-})();
+})();
@@ -44,7 +44,7 @@ describe('Array.from', function(){
var array = Array.from(div1.getElementsByTagName('*'));
expect(Type.isArray(array)).toEqual(true);
});
-
+
it('should return an array for an Options collection', function(){
var div = document.createElement('div');
div.innerHTML = '<select><option>a</option></select>';
@@ -53,4 +53,4 @@ describe('Array.from', function(){
expect(Type.isArray(array)).toEqual(true);
});
-});
+});
@@ -28,7 +28,7 @@ describe('Element.getOffsetParent', function(){
td = new Element('td').inject(new Element('tr').inject(table));
container.inject(document.body);
-
+
});
it('Should return the right offsetParent', function(){
Oops, something went wrong.

1 comment on commit c5cae2a

Owner

ibolmo commented on c5cae2a Aug 21, 2012

lol nice.

Please sign in to comment.