},
/**
- * Returns a RFC4122 version 4 compilant UUID.
- *
- * @see http://stackoverflow.com/a/2117523
- * @return string
+ * @deprecated Use WoltLab/WCF/Core.getUUID()
*/
getUUID: function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
return out;
},
+ /**
+ * Returns a RFC4122 version 4 compilant UUID.
+ *
+ * @see http://stackoverflow.com/a/2117523
+ * @return {string}
+ */
+ getUUID: function() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+ var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
+ return v.toString(16);
+ });
+ },
+
triggerEvent: function(el, eventName) {
var ev;
if (document.createEvent) {
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @module WoltLab/WCF/Event/Handler
*/
-define(['Dictionary'], function(Dictionary) {
+define(['Core', 'Dictionary'], function(Core, Dictionary) {
"use strict";
var _listeners = new Dictionary();
actions.set(action, callbacks);
}
- var uuid = WCF.getUUID();
+ var uuid = Core.getUUID();
callbacks.set(uuid, callback);
return uuid;