Forráskód Böngészése

added getSession()

Nicolas Cannasse 14 éve
szülő
commit
127585f833
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      std/js/Storage.hx

+ 4 - 0
std/js/Storage.hx

@@ -38,4 +38,8 @@ extern class Storage {
 		return untyped try window['localStorage'] catch( e : Dynamic ) null;
 	}
 
+	public static inline function getSession() : Storage {
+		return untyped try window['sessionStorage'] catch( e : Dynamic ) null;
+	}
+
 }