changeset 1162:a679987d13cc

Feature #1471: <navigator> now includes the screen dimensions
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Tue, 26 Jan 2016 14:54:39 +0000
parents 329a558b7be5
children fb062819d956
files core.js
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Tue Jan 26 14:20:43 2016 +0000
+++ b/core.js	Tue Jan 26 14:54:39 2016 +0000
@@ -2322,16 +2322,20 @@
 	
 	this.returnNavigator = function()
 	{
-		var node = document.createElement("navigator");
-		var platform = document.createElement("platform");
+		var node = storage.document.createElement("navigator");
+		var platform = storage.document.createElement("platform");
 		platform.textContent = navigator.platform;
-		var vendor = document.createElement("vendor");
+		var vendor = storage.document.createElement("vendor");
 		vendor.textContent = navigator.vendor;
-		var userAgent = document.createElement("uagent");
+		var userAgent = storage.document.createElement("uagent");
 		userAgent.textContent = navigator.userAgent;
+        var screen = storage.document.createElement("window");
+        screen.setAttribute('innerWidth',window.innerWidth);
+        screen.setAttribute('innerHeight',window.innerHeight);
 		node.appendChild(platform);
 		node.appendChild(vendor);
 		node.appendChild(userAgent);
+        node.appendChild(screen);
 		return node;
 	};