]> git.proxmox.com Git - mirror_novnc.git/commit
Cleanup: Util code
authorSolly Ross <sross@redhat.com>
Wed, 21 May 2014 18:54:28 +0000 (14:54 -0400)
committerSolly Ross <sross@redhat.com>
Mon, 15 Sep 2014 20:46:02 +0000 (16:46 -0400)
commitd21cd6c16453eec8ec4b218dff6dffecf55aa518
tree70e4b8add3fa4a7f07ed862394d338a551d4c75b
parentfb64ed213584423475a262631b6be2e2a157c628
Cleanup: Util code

File: util.js
Tests Added: True (partial -- for logging and array push methods)
Changes:
- Fixed JSHint Errors (indentation, semicolons, global "use strict")
- Made browser detection methods more readable
- added some newline characters when appropriate for readability
- throw Errors not strings!
- Removed conf_defaults, and added make_properties and set_defaults
  instead (see below)

The removal of conf_defaults and switch to make_properties and
set_defaults is to facilitate the switch over to normal Javascript
constructors instead of Crockford-style constructors.  Now, methods
are added to the objects prototype (and thus make properties is called
outside the constructor).
include/util.js
tests/test.util.js [new file with mode: 0644]