diff --git a/common.blocks/identify/identify.vanilla.js b/common.blocks/identify/identify.vanilla.js
index dcc04735..3db39ea6 100644
--- a/common.blocks/identify/identify.vanilla.js
+++ b/common.blocks/identify/identify.vanilla.js
@@ -6,15 +6,19 @@ modules.define('identify', function(provide) {
var counter = 0,
expando = '__' + (+new Date),
+ global = this.global,
get = function() {
return 'uniq' + (++counter);
},
identify = function(obj) {
if((typeof obj === 'object' && obj !== null) || typeof obj === 'function') {
- var key = 'uniqueID' in obj && obj !== document ?
- 'uniqueID' :
- expando; // Use when possible native uniqueID for elements in IE
-
+ var key;
+ if('uniqueID' in obj) {
+ obj === global.document && (obj = obj.documentElement);
+ key = 'uniqueID';
+ } else {
+ key = expando;
+ }
return key in obj?
obj[key] :
obj[key] = get();
diff --git a/test/dist/fixtures/desktop.html b/test/dist/fixtures/desktop.html
index a4a6ba87..d7956f29 100644
--- a/test/dist/fixtures/desktop.html
+++ b/test/dist/fixtures/desktop.html
@@ -27,10 +27,10 @@
-
-
+
+
@@ -38,19 +38,19 @@
-
-
-
+
+
+
-
+
diff --git a/test/dist/fixtures/touch.html b/test/dist/fixtures/touch.html
index 47d5e8d0..d0cbda5f 100644
--- a/test/dist/fixtures/touch.html
+++ b/test/dist/fixtures/touch.html
@@ -25,24 +25,24 @@
});
}());
-
+
-
+
-
+
-
-
+
+