diff lib/js/urweb.js @ 1556:e1f5d9c4cc20

An abstract type of IDs
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Sep 2011 12:51:05 -0400
parents d5c961c709f9
children df6a7a22760a
line wrap: on
line diff
--- a/lib/js/urweb.js	Sat Sep 03 11:48:12 2011 -0400
+++ b/lib/js/urweb.js	Sat Sep 03 12:51:05 2011 -0400
@@ -1374,5 +1374,14 @@
     return u;
 }
 
+
+// ID generation
+
+var nextId = 0;
+
+function fresh() {
+    return (--nextId).toString();
+}
+
 // App-specific code