Skip to content

Commit

Permalink
fusejs: Remove unused dom feature tests. [jddalton]
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 3, 2010
1 parent 7fe7b64 commit 72bf054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/dom/element/element.js
Expand Up @@ -78,7 +78,7 @@
plugin.contains.call(element.ownerDocument, element));
};

if (envTest('ELEMENT_SOURCE_INDEX', 'DOCUMENT_ALL_COLLECTION')) {
if (envTest('ELEMENT_SOURCE_INDEX')) {
plugin.isDetached = function isDetached() {
var element = this.raw || this;
return element.ownerDocument.all[element.sourceIndex] != element;
Expand Down
37 changes: 2 additions & 35 deletions src/dom/features.js
@@ -1,21 +1,6 @@
/*----------------------------- DOM: FEATURES ------------------------------*/

envAddTest({
'DOCUMENT_ALL_COLLECTION': function() {
// true for all but Firefox
isHostType(fuse._doc, 'all');
},

'DOCUMENT_CREATE_EVENT': function() {
// true for all but IE
return isHostType(fuse._doc, 'createEvent');
},

'DOCUMENT_CREATE_EVENT_OBJECT': function() {
// true for IE
return isHostType(fuse._doc, 'createEventObject');
},

'ELEMENT_ADD_EVENT_LISTENER': function() {
// true for all but IE
return isHostType(fuse._doc, 'addEventListener');
Expand Down Expand Up @@ -63,21 +48,11 @@
},

// features
'ELEMENT_DISPATCH_EVENT': function() {
// true for all but IE
return isHostType(fuse._docEl, 'dispatchEvent');
},

'ELEMENT_DO_SCROLL': function() {
// true for IE
return isHostType(fuse._docEl, 'doScroll');
},

'ELEMENT_FIRE_EVENT': function() {
// true for IE
return isHostType(fuse._docEl, 'fireEvent');
},

'ELEMENT_GET_ATTRIBUTE_IFLAG': function() {
// true for IE
var div = fuse._div, result = false;
Expand Down Expand Up @@ -121,7 +96,8 @@

'ELEMENT_SOURCE_INDEX': function() {
// true for IE and Opera
return typeof fuse._docEl.sourceIndex == 'number';
return isHostType(fuse._doc, 'all') &&
typeof fuse._docEl.sourceIndex == 'number'
},

'ELEMENT_TEXT_CONTENT': function() {
Expand Down Expand Up @@ -261,15 +237,6 @@
return result;
},

'GET_ELEMENTS_BY_TAG_NAME_RETURNS_COMMENT_NODES': function() {
// true for IE
var div = fuse._div;
div.innerHTML = '<p>x<\/p><!--y-->';
var result = div.getElementsByTagName('*').length == 2;
div.innerHTML = '';
return result;
},

'INPUT_VALUE_PROPERTY_SETS_ATTRIBUTE': function() {
// true for IE
var input = fuse._doc.createElement('input');
Expand Down

0 comments on commit 72bf054

Please sign in to comment.