sequenceserver 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (667) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sequenceserver/api_errors.rb +24 -2
  3. data/lib/sequenceserver/blast/job.rb +41 -7
  4. data/lib/sequenceserver/blast/report.rb +36 -30
  5. data/lib/sequenceserver/config.rb +49 -27
  6. data/lib/sequenceserver/job.rb +13 -3
  7. data/lib/sequenceserver/job_remover.rb +25 -29
  8. data/lib/sequenceserver/refinements.rb +15 -0
  9. data/lib/sequenceserver/routes.rb +69 -7
  10. data/lib/sequenceserver/sequence.rb +8 -7
  11. data/lib/sequenceserver/sys.rb +2 -2
  12. data/lib/sequenceserver/version.rb +1 -1
  13. data/lib/sequenceserver/zip_file_generator.rb +56 -0
  14. data/lib/sequenceserver.rb +1 -0
  15. data/public/config.js +149 -143
  16. data/public/css/sequenceserver.css +44 -3
  17. data/public/css/sequenceserver.min.css +3 -3
  18. data/public/js/alignment_exporter.js +16 -8
  19. data/public/js/circos.js +370 -234
  20. data/public/js/cloud_share_modal.js +216 -0
  21. data/public/js/databases.js +144 -0
  22. data/public/js/databases_tree.js +42 -113
  23. data/public/js/dnd.js +164 -0
  24. data/public/js/error_modal.js +4 -11
  25. data/public/js/exporter.js +7 -3
  26. data/public/js/form.js +260 -0
  27. data/public/js/grapher.js +113 -106
  28. data/public/js/hit.js +80 -67
  29. data/public/js/hits_overview.js +2 -2
  30. data/public/js/hsp.js +343 -288
  31. data/public/js/jquery_world.js +4 -4
  32. data/public/js/mailto.js +36 -0
  33. data/public/js/options.js +84 -0
  34. data/public/js/query.js +319 -59
  35. data/public/js/report.js +315 -269
  36. data/public/js/report_root.js +75 -0
  37. data/public/js/search.js +28 -1011
  38. data/public/js/search_button.js +195 -0
  39. data/public/js/sequence.js +2409 -2411
  40. data/public/js/sequence_modal.js +152 -159
  41. data/public/js/share_url.js +23 -0
  42. data/public/js/sidebar.js +262 -83
  43. data/public/js/tests/database.spec.js +60 -0
  44. data/public/js/tests/mock_data/databases.json +91 -0
  45. data/public/js/tests/mock_data/long_response.json +269 -0
  46. data/public/js/tests/mock_data/short_response.json +2240 -0
  47. data/public/js/tests/report.spec.js +99 -0
  48. data/public/js/tests/search_button.spec.js +14 -0
  49. data/public/js/tests/search_query.spec.js +41 -0
  50. data/public/packages/circosJS@1.7.0.js +1640 -0
  51. data/public/packages/jquery-ui@1.11.4.js +16624 -0
  52. data/public/sequenceserver-report.min.js +2425 -19
  53. data/public/sequenceserver-search.min.js +2337 -15
  54. data/public/vendor/github/jspm/nodelibs-assert@0.1.0/index.js +2 -0
  55. data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-assert@0.1.0}/package.json +1 -1
  56. data/public/vendor/github/jspm/nodelibs-assert@0.1.0.js +1 -0
  57. data/public/vendor/github/jspm/nodelibs-buffer@0.1.1/package.json +6 -0
  58. data/public/vendor/github/jspm/nodelibs-buffer@0.1.1.js +1 -0
  59. data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/package.json +2 -2
  60. data/public/vendor/github/jspm/nodelibs-process@0.1.2.js +1 -0
  61. data/public/vendor/github/jspm/nodelibs-vm@0.1.0/index.js +2 -0
  62. data/public/vendor/github/jspm/nodelibs-vm@0.1.0/package.json +6 -0
  63. data/public/vendor/github/jspm/nodelibs-vm@0.1.0.js +1 -0
  64. data/public/vendor/npm/assert@1.5.0/CHANGELOG.md +8 -0
  65. data/public/vendor/npm/assert@1.5.0/README.md +105 -0
  66. data/public/vendor/npm/assert@1.5.0/assert.js +327 -0
  67. data/public/vendor/npm/assert@1.5.0/package.json +32 -0
  68. data/public/vendor/npm/assert@1.5.0/test.js +288 -0
  69. data/public/vendor/npm/assert@1.5.0.js +1 -0
  70. data/public/vendor/npm/{base64-js@0.0.8/LICENSE.MIT → base64-js@1.5.1/LICENSE} +1 -1
  71. data/public/vendor/npm/{base64-js@0.0.8 → base64-js@1.5.1}/README.md +10 -7
  72. data/public/vendor/npm/base64-js@1.5.1/base64js.min.js +3 -0
  73. data/public/vendor/npm/base64-js@1.5.1/index.d.ts +3 -0
  74. data/public/vendor/npm/base64-js@1.5.1/index.js +151 -0
  75. data/public/vendor/npm/base64-js@1.5.1/package.json +47 -0
  76. data/public/vendor/npm/base64-js@1.5.1.js +1 -0
  77. data/public/vendor/npm/buffer@5.7.1/AUTHORS.md +70 -0
  78. data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/README.md +111 -41
  79. data/public/vendor/npm/buffer@5.7.1/index.d.ts +186 -0
  80. data/public/vendor/npm/buffer@5.7.1/index.js +1817 -0
  81. data/public/vendor/npm/buffer@5.7.1/package.json +96 -0
  82. data/public/vendor/npm/buffer@5.7.1.js +1 -0
  83. data/public/vendor/npm/core-util-is@1.0.3/LICENSE +19 -0
  84. data/public/vendor/npm/core-util-is@1.0.3/lib/util.js +64 -0
  85. data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/package.json +13 -1
  86. data/public/vendor/npm/core-util-is@1.0.3.js +1 -0
  87. data/public/vendor/npm/events@1.0.2/tests/add-listeners.js +2 -2
  88. data/public/vendor/npm/events@1.0.2/tests/check-listener-leaks.js +3 -3
  89. data/public/vendor/npm/events@1.0.2/tests/common.js +1 -1
  90. data/public/vendor/npm/events@1.0.2/tests/index.js +13 -13
  91. data/public/vendor/npm/events@1.0.2/tests/listeners-side-effects.js +2 -2
  92. data/public/vendor/npm/events@1.0.2/tests/listeners.js +2 -2
  93. data/public/vendor/npm/events@1.0.2/tests/max-listeners.js +2 -2
  94. data/public/vendor/npm/events@1.0.2/tests/modify-in-emit.js +2 -2
  95. data/public/vendor/npm/events@1.0.2/tests/num-args.js +2 -2
  96. data/public/vendor/npm/events@1.0.2/tests/once.js +2 -2
  97. data/public/vendor/npm/events@1.0.2/tests/remove-all-listeners.js +3 -3
  98. data/public/vendor/npm/events@1.0.2/tests/remove-listeners.js +3 -3
  99. data/public/vendor/npm/events@1.0.2/tests/set-max-listeners-side-effects.js +2 -2
  100. data/public/vendor/npm/events@1.0.2/tests/subclass.js +3 -3
  101. data/public/vendor/npm/events@1.0.2.js +1 -1
  102. data/public/vendor/npm/ieee754@1.2.1/LICENSE +11 -0
  103. data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/README.md +12 -8
  104. data/public/vendor/npm/ieee754@1.2.1/index.d.ts +10 -0
  105. data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/index.js +6 -6
  106. data/public/vendor/npm/ieee754@1.2.1/package.json +52 -0
  107. data/public/vendor/npm/ieee754@1.2.1.js +1 -0
  108. data/public/vendor/npm/{is-array@1.0.1 → indexof@0.0.1}/Makefile +3 -3
  109. data/public/vendor/npm/indexof@0.0.1/Readme.md +15 -0
  110. data/public/vendor/npm/indexof@0.0.1/component.json +10 -0
  111. data/public/vendor/npm/indexof@0.0.1/index.js +11 -0
  112. data/public/vendor/npm/indexof@0.0.1/package.json +12 -0
  113. data/public/vendor/npm/indexof@0.0.1.js +1 -0
  114. data/public/vendor/npm/inherits@2.0.1/inherits.js +1 -1
  115. data/public/vendor/npm/inherits@2.0.1.js +1 -1
  116. data/public/vendor/npm/isarray@0.0.1.js +1 -1
  117. data/public/vendor/npm/js-tokens@4.0.0/index.js +23 -0
  118. data/public/vendor/npm/js-tokens@4.0.0/package.json +30 -0
  119. data/public/vendor/npm/js-tokens@4.0.0.js +1 -0
  120. data/public/vendor/npm/loose-envify@1.4.0/LICENSE +21 -0
  121. data/public/vendor/npm/loose-envify@1.4.0/README.md +45 -0
  122. data/public/vendor/npm/loose-envify@1.4.0/cli.js +12 -0
  123. data/public/vendor/npm/loose-envify@1.4.0/custom.js +3 -0
  124. data/public/vendor/npm/loose-envify@1.4.0/index.js +5 -0
  125. data/public/vendor/npm/loose-envify@1.4.0/loose-envify.js +33 -0
  126. data/public/vendor/npm/loose-envify@1.4.0/package.json +36 -0
  127. data/public/vendor/npm/loose-envify@1.4.0/replace.js +52 -0
  128. data/public/vendor/npm/loose-envify@1.4.0.js +1 -0
  129. data/public/vendor/npm/object-assign@4.1.1/index.js +90 -0
  130. data/public/vendor/npm/object-assign@4.1.1/package.json +42 -0
  131. data/public/vendor/npm/object-assign@4.1.1.js +1 -0
  132. data/public/vendor/npm/path-browserify@0.0.0/index.js +1 -1
  133. data/public/vendor/npm/path-browserify@0.0.0.js +1 -1
  134. data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/README.md +4 -1
  135. data/public/vendor/npm/process@0.11.10/browser.js +184 -0
  136. data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/package.json +10 -1
  137. data/public/vendor/npm/process@0.11.10/test.js +185 -0
  138. data/public/vendor/npm/process@0.11.10.js +1 -0
  139. data/public/vendor/npm/react-dom@18.0.0/LICENSE +21 -0
  140. data/public/vendor/npm/react-dom@18.0.0/README.md +50 -0
  141. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.development.js +4771 -0
  142. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.production.min.js +85 -0
  143. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.development.js +4813 -0
  144. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.production.min.js +1705 -0
  145. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.development.js +4746 -0
  146. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.production.min.js +90 -0
  147. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.development.js +4714 -0
  148. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.production.min.js +1746 -0
  149. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.development.js +1017 -0
  150. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.production.min.js +617 -0
  151. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.development.js +20092 -0
  152. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.production.min.js +322 -0
  153. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.profiling.min.js +364 -0
  154. data/public/vendor/npm/react-dom@18.0.0/client.js +27 -0
  155. data/public/vendor/npm/react-dom@18.0.0/index.js +23 -0
  156. data/public/vendor/npm/react-dom@18.0.0/package.json +62 -0
  157. data/public/vendor/npm/react-dom@18.0.0/profiling.js +23 -0
  158. data/public/vendor/npm/react-dom@18.0.0/server.browser.js +19 -0
  159. data/public/vendor/npm/react-dom@18.0.0/server.js +3 -0
  160. data/public/vendor/npm/react-dom@18.0.0/server.node.js +19 -0
  161. data/public/vendor/npm/react-dom@18.0.0/test-utils.js +9 -0
  162. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.development.js +4770 -0
  163. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.production.min.js +72 -0
  164. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.development.js +4745 -0
  165. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.production.min.js +74 -0
  166. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.development.js +1013 -0
  167. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.production.min.js +625 -0
  168. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.development.js +20106 -0
  169. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.production.min.js +269 -0
  170. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.profiling.min.js +285 -0
  171. data/public/vendor/npm/react-dom@18.0.0.js +1 -0
  172. data/public/vendor/npm/react@18.0.0/LICENSE +21 -0
  173. data/public/vendor/npm/react@18.0.0/README.md +13 -0
  174. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.development.js +837 -0
  175. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.production.min.js +10 -0
  176. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.profiling.min.js +10 -0
  177. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.development.js +849 -0
  178. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.production.min.js +38 -0
  179. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.profiling.min.js +38 -0
  180. data/public/vendor/npm/react@18.0.0/cjs/react.development.js +1746 -0
  181. data/public/vendor/npm/react@18.0.0/cjs/react.production.min.js +26 -0
  182. data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.development.js +10 -0
  183. data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.production.min.js +12 -0
  184. data/public/vendor/npm/react@18.0.0/index.js +9 -0
  185. data/public/vendor/npm/react@18.0.0/jsx-dev-runtime.js +9 -0
  186. data/public/vendor/npm/react@18.0.0/jsx-runtime.js +9 -0
  187. data/public/vendor/npm/react@18.0.0/package.json +47 -0
  188. data/public/vendor/npm/react@18.0.0/react.shared-subset.js +9 -0
  189. data/public/vendor/npm/react@18.0.0/umd/react.development.js +2186 -0
  190. data/public/vendor/npm/react@18.0.0/umd/react.production.min.js +33 -0
  191. data/public/vendor/npm/react@18.0.0/umd/react.profiling.min.js +33 -0
  192. data/public/vendor/npm/react@18.0.0.js +1 -0
  193. data/public/vendor/npm/readable-stream@1.1.14/LICENSE +18 -0
  194. data/public/vendor/npm/readable-stream@1.1.14/duplex.js +2 -0
  195. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_duplex.js +5 -5
  196. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_passthrough.js +3 -3
  197. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_readable.js +10 -10
  198. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_transform.js +4 -4
  199. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_writable.js +6 -6
  200. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/package.json +1 -1
  201. data/public/vendor/npm/readable-stream@1.1.14/passthrough.js +2 -0
  202. data/public/vendor/npm/readable-stream@1.1.14/readable.js +13 -0
  203. data/public/vendor/npm/readable-stream@1.1.14/transform.js +2 -0
  204. data/public/vendor/npm/readable-stream@1.1.14/writable.js +2 -0
  205. data/public/vendor/npm/readable-stream@1.1.14.js +1 -0
  206. data/public/vendor/npm/scheduler@0.21.0/LICENSE +21 -0
  207. data/public/vendor/npm/scheduler@0.21.0/README.md +9 -0
  208. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.development.js +530 -0
  209. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.production.min.js +20 -0
  210. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.development.js +153 -0
  211. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.production.min.js +14 -0
  212. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.development.js +444 -0
  213. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.production.min.js +19 -0
  214. data/public/vendor/npm/scheduler@0.21.0/index.js +9 -0
  215. data/public/vendor/npm/scheduler@0.21.0/package.json +36 -0
  216. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.development.js +701 -0
  217. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.production.min.js +21 -0
  218. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.development.js +154 -0
  219. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.production.min.js +148 -0
  220. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.profiling.min.js +148 -0
  221. data/public/vendor/npm/scheduler@0.21.0/unstable_mock.js +9 -0
  222. data/public/vendor/npm/scheduler@0.21.0/unstable_post_task.js +9 -0
  223. data/public/vendor/npm/scheduler@0.21.0.js +1 -0
  224. data/public/vendor/npm/stream-browserify@1.0.0/index.js +7 -7
  225. data/public/vendor/npm/stream-browserify@1.0.0/test/buf.js +5 -5
  226. data/public/vendor/npm/stream-browserify@1.0.0.js +1 -1
  227. data/public/vendor/npm/string_decoder@0.10.31/index.js +2 -2
  228. data/public/vendor/npm/string_decoder@0.10.31.js +1 -1
  229. data/public/vendor/npm/util@0.10.3/support/isBuffer.js +1 -1
  230. data/public/vendor/npm/util@0.10.3/test/browser/inspect.js +2 -2
  231. data/public/vendor/npm/util@0.10.3/test/browser/is.js +3 -3
  232. data/public/vendor/npm/util@0.10.3/test/node/debug.js +4 -4
  233. data/public/vendor/npm/util@0.10.3/test/node/format.js +2 -2
  234. data/public/vendor/npm/util@0.10.3/test/node/inspect.js +3 -3
  235. data/public/vendor/npm/util@0.10.3/test/node/log.js +3 -3
  236. data/public/vendor/npm/util@0.10.3/test/node/util.js +3 -3
  237. data/public/vendor/npm/util@0.10.3/util.js +3 -3
  238. data/public/vendor/npm/util@0.10.3.js +1 -1
  239. data/public/vendor/npm/vm-browserify@0.0.4/LICENSE +18 -0
  240. data/public/vendor/npm/vm-browserify@0.0.4/example/run/bundle.js +376 -0
  241. data/public/vendor/npm/vm-browserify@0.0.4/example/run/entry.js +6 -0
  242. data/public/vendor/npm/vm-browserify@0.0.4/example/run/index.html +9 -0
  243. data/public/vendor/npm/vm-browserify@0.0.4/example/run/server.js +6 -0
  244. data/public/vendor/npm/vm-browserify@0.0.4/index.js +139 -0
  245. data/public/vendor/npm/vm-browserify@0.0.4/package.json +46 -0
  246. data/public/vendor/npm/vm-browserify@0.0.4/readme.markdown +67 -0
  247. data/public/vendor/npm/vm-browserify@0.0.4/test/vm.js +34 -0
  248. data/public/vendor/npm/vm-browserify@0.0.4.js +1 -0
  249. data/public/vendor/npm/webshim@1.15.8/Gruntfile.js +4 -4
  250. data/public/vendor/npm/webshim@1.15.8/build/combobuild.js +2 -2
  251. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/color-picker.js +1 -1
  252. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/10.js +1 -1
  253. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/11.js +1 -1
  254. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/17.js +1 -1
  255. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/5.js +1 -1
  256. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/6.js +1 -1
  257. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/9.js +1 -1
  258. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/es6.js +1 -1
  259. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/excanvas.js +1 -1
  260. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/form-number-date-ui.js +1 -1
  261. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-html4.js +1 -1
  262. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-swf.js +1 -1
  263. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/sizzle.js +1 -1
  264. data/public/vendor/npm/webshim@1.15.8/js-webshim/minified/shims/es6.js +1 -1
  265. data/public/vendor/npm/webshim@1.15.8/src/shims/color-picker.js +1 -1
  266. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/10.js +1 -1
  267. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/11.js +1 -1
  268. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/17.js +1 -1
  269. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/5.js +1 -1
  270. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/6.js +1 -1
  271. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/9.js +1 -1
  272. data/public/vendor/npm/webshim@1.15.8/src/shims/es6.js +1 -1
  273. data/public/vendor/npm/webshim@1.15.8/src/shims/excanvas.js +1 -1
  274. data/public/vendor/npm/webshim@1.15.8/src/shims/form-number-date-ui.js +1 -1
  275. data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-html4.js +1 -1
  276. data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-swf.js +1 -1
  277. data/public/vendor/npm/webshim@1.15.8/src/shims/sizzle.js +1 -1
  278. data/public/vendor/npm/webshim@1.15.8/tests/dist/jquery.js +1 -1
  279. data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/core.js +1 -1
  280. data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/event.js +1388 -711
  281. data/public/vendor/npm/webshim@1.15.8/tests/qunit/qunit.js +1 -1
  282. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-1-custom.js +1 -1
  283. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-2-custom.js +1 -1
  284. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/punycode.js +1 -1
  285. data/public/vendor/system-polyfills.js +865 -1
  286. data/views/blastn_options.erb +291 -0
  287. data/views/blastp_options.erb +288 -0
  288. data/views/blastx_options.erb +318 -0
  289. data/views/error.erb +12 -0
  290. data/views/layout.erb +2 -30
  291. data/views/report.erb +0 -8
  292. data/views/search.erb +16 -9
  293. data/views/tblastn_options.erb +266 -0
  294. data/views/tblastx_options.erb +291 -0
  295. metadata +318 -439
  296. data/public/vendor/github/jspm/nodelibs-buffer@0.1.0.js +0 -1
  297. data/public/vendor/github/jspm/nodelibs-module@0.1.0/index.js +0 -1
  298. data/public/vendor/github/jspm/nodelibs-module@0.1.0.js +0 -1
  299. data/public/vendor/github/jspm/nodelibs-process@0.1.1.js +0 -1
  300. data/public/vendor/npm/amdefine@1.0.0/LICENSE +0 -58
  301. data/public/vendor/npm/amdefine@1.0.0/README.md +0 -171
  302. data/public/vendor/npm/amdefine@1.0.0/amdefine.js +0 -200
  303. data/public/vendor/npm/amdefine@1.0.0/intercept.js +0 -24
  304. data/public/vendor/npm/amdefine@1.0.0/package.json +0 -16
  305. data/public/vendor/npm/amdefine@1.0.0.js +0 -1
  306. data/public/vendor/npm/base62@0.1.1/LICENSE +0 -20
  307. data/public/vendor/npm/base62@0.1.1/Readme.md +0 -30
  308. data/public/vendor/npm/base62@0.1.1/base62.js +0 -28
  309. data/public/vendor/npm/base62@0.1.1/package.json +0 -21
  310. data/public/vendor/npm/base62@0.1.1/test/test.js +0 -13
  311. data/public/vendor/npm/base62@0.1.1.js +0 -1
  312. data/public/vendor/npm/base64-js@0.0.8/lib/b64.js +0 -125
  313. data/public/vendor/npm/base64-js@0.0.8/package.json +0 -34
  314. data/public/vendor/npm/base64-js@0.0.8/test/convert.js +0 -39
  315. data/public/vendor/npm/base64-js@0.0.8/test/url-safe.js +0 -15
  316. data/public/vendor/npm/base64-js@0.0.8.js +0 -1
  317. data/public/vendor/npm/buffer@3.4.3/index.js +0 -1533
  318. data/public/vendor/npm/buffer@3.4.3/package.json +0 -67
  319. data/public/vendor/npm/buffer@3.4.3/test/_polyfill.js +0 -152
  320. data/public/vendor/npm/buffer@3.4.3/test/base64.js +0 -33
  321. data/public/vendor/npm/buffer@3.4.3/test/basic.js +0 -58
  322. data/public/vendor/npm/buffer@3.4.3/test/compare.js +0 -53
  323. data/public/vendor/npm/buffer@3.4.3/test/constructor.js +0 -132
  324. data/public/vendor/npm/buffer@3.4.3/test/deprecated.js +0 -21
  325. data/public/vendor/npm/buffer@3.4.3/test/from-string.js +0 -105
  326. data/public/vendor/npm/buffer@3.4.3/test/methods.js +0 -109
  327. data/public/vendor/npm/buffer@3.4.3/test/node/README.txt +0 -1
  328. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-ascii.js +0 -20
  329. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-bytelength.js +0 -38
  330. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js +0 -26
  331. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-indexof.js +0 -78
  332. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-inspect.js +0 -31
  333. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer.js +0 -804
  334. data/public/vendor/npm/buffer@3.4.3/test/node-es6/README.txt +0 -1
  335. data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-arraybuffer.js +0 -37
  336. data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-iterator.js +0 -32
  337. data/public/vendor/npm/buffer@3.4.3/test/slice.js +0 -33
  338. data/public/vendor/npm/buffer@3.4.3/test/static.js +0 -32
  339. data/public/vendor/npm/buffer@3.4.3/test/to-string.js +0 -106
  340. data/public/vendor/npm/buffer@3.4.3/test/write.js +0 -90
  341. data/public/vendor/npm/buffer@3.4.3.js +0 -1
  342. data/public/vendor/npm/core-util-is@1.0.1/float.patch +0 -604
  343. data/public/vendor/npm/core-util-is@1.0.1/lib/util.js +0 -66
  344. data/public/vendor/npm/core-util-is@1.0.1/util.js +0 -66
  345. data/public/vendor/npm/core-util-is@1.0.1.js +0 -1
  346. data/public/vendor/npm/envify@3.4.0/README.md +0 -145
  347. data/public/vendor/npm/envify@3.4.0/bin/envify +0 -17
  348. data/public/vendor/npm/envify@3.4.0/custom.js +0 -33
  349. data/public/vendor/npm/envify@3.4.0/index.js +0 -4
  350. data/public/vendor/npm/envify@3.4.0/package.json +0 -35
  351. data/public/vendor/npm/envify@3.4.0/visitors.js +0 -33
  352. data/public/vendor/npm/envify@3.4.0.js +0 -1
  353. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esparse.js +0 -90
  354. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esvalidate.js +0 -145
  355. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/esprima.js +0 -6191
  356. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/package.json +0 -72
  357. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/compat.js +0 -167
  358. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/reflect.js +0 -421
  359. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/run.js +0 -34
  360. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/runner.js +0 -418
  361. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/test.js +0 -34730
  362. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb.js +0 -1
  363. data/public/vendor/npm/ieee754@1.1.6/LICENSE +0 -56
  364. data/public/vendor/npm/ieee754@1.1.6/package.json +0 -34
  365. data/public/vendor/npm/ieee754@1.1.6/test/basic.js +0 -20
  366. data/public/vendor/npm/ieee754@1.1.6.js +0 -1
  367. data/public/vendor/npm/is-array@1.0.1/History.md +0 -11
  368. data/public/vendor/npm/is-array@1.0.1/Readme.md +0 -27
  369. data/public/vendor/npm/is-array@1.0.1/component.json +0 -13
  370. data/public/vendor/npm/is-array@1.0.1/index.js +0 -33
  371. data/public/vendor/npm/is-array@1.0.1/package.json +0 -10
  372. data/public/vendor/npm/is-array@1.0.1/test/test.html +0 -46
  373. data/public/vendor/npm/is-array@1.0.1.js +0 -1
  374. data/public/vendor/npm/jstransform@10.1.0/LICENSE +0 -201
  375. data/public/vendor/npm/jstransform@10.1.0/README.md +0 -98
  376. data/public/vendor/npm/jstransform@10.1.0/jestEnvironment.js +0 -3
  377. data/public/vendor/npm/jstransform@10.1.0/jestPreprocessor.js +0 -8
  378. data/public/vendor/npm/jstransform@10.1.0/package.json +0 -52
  379. data/public/vendor/npm/jstransform@10.1.0/polyfill/Object.es6.js +0 -54
  380. data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-test.js +0 -246
  381. data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-utils-test.js +0 -31
  382. data/public/vendor/npm/jstransform@10.1.0/src/docblock.js +0 -86
  383. data/public/vendor/npm/jstransform@10.1.0/src/jstransform.js +0 -180
  384. data/public/vendor/npm/jstransform@10.1.0/src/utils.js +0 -386
  385. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-arrow-function-visitors-test.js +0 -57
  386. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-call-spread-visitors-test.js +0 -46
  387. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-class-visitors-test.js +0 -463
  388. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-destructuring-visitors-test.js +0 -144
  389. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-es7-object-integration-test.js +0 -40
  390. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-concise-method-visitors-test.js +0 -47
  391. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-short-notation-visitors-test.js +0 -33
  392. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-rest-param-visitors-test.js +0 -119
  393. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-template-visitors-test.js +0 -138
  394. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-rest-property-helpers-test.js +0 -47
  395. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-spread-property-visitors-test.js +0 -90
  396. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/generate-type-syntax-test.js +0 -40
  397. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/type-syntax-test.rec.js +0 -846
  398. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/reserved-words-test.js +0 -40
  399. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-alias-syntax-test.js +0 -34
  400. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-class-syntax-test.js +0 -105
  401. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-function-syntax-test.js +0 -126
  402. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-interface-syntax-test.js +0 -29
  403. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-object-method-syntax-test.js +0 -65
  404. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-pattern-syntax-test.js +0 -45
  405. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-syntax-test.js +0 -46
  406. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-variable-declaration-syntax-test.js +0 -102
  407. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-arrow-function-visitors.js +0 -66
  408. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-call-spread-visitors.js +0 -72
  409. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-class-visitors.js +0 -316
  410. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-destructuring-visitors.js +0 -135
  411. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-concise-method-visitors.js +0 -28
  412. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-short-notation-visitors.js +0 -12
  413. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-rest-param-visitors.js +0 -45
  414. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-template-visitors.js +0 -90
  415. data/public/vendor/npm/jstransform@10.1.0/visitors/es7-rest-property-helpers.js +0 -80
  416. data/public/vendor/npm/jstransform@10.1.0/visitors/es7-spread-property-visitors.js +0 -56
  417. data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-helper.js +0 -74
  418. data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-visitors.js +0 -30
  419. data/public/vendor/npm/jstransform@10.1.0/visitors/type-syntax.js +0 -118
  420. data/public/vendor/npm/jstransform@10.1.0.js +0 -1
  421. data/public/vendor/npm/process@0.10.1/browser.js +0 -58
  422. data/public/vendor/npm/process@0.10.1.js +0 -1
  423. data/public/vendor/npm/qs@2.4.1/test/stringify.js +0 -162
  424. data/public/vendor/npm/react@0.13.3/README.md +0 -20
  425. data/public/vendor/npm/react@0.13.3/addons.js +0 -2
  426. data/public/vendor/npm/react@0.13.3/dist/JSXTransformer.js +0 -11346
  427. data/public/vendor/npm/react@0.13.3/dist/react-with-addons.js +0 -10483
  428. data/public/vendor/npm/react@0.13.3/dist/react-with-addons.min.js +0 -7297
  429. data/public/vendor/npm/react@0.13.3/dist/react.js +0 -9468
  430. data/public/vendor/npm/react@0.13.3/dist/react.min.js +0 -6764
  431. data/public/vendor/npm/react@0.13.3/lib/AutoFocusMixin.js +0 -9
  432. data/public/vendor/npm/react@0.13.3/lib/BeforeInputEventPlugin.js +0 -197
  433. data/public/vendor/npm/react@0.13.3/lib/CSSCore.js +0 -39
  434. data/public/vendor/npm/react@0.13.3/lib/CSSProperty.js +0 -123
  435. data/public/vendor/npm/react@0.13.3/lib/CSSPropertyOperations.js +0 -103
  436. data/public/vendor/npm/react@0.13.3/lib/CallbackQueue.js +0 -43
  437. data/public/vendor/npm/react@0.13.3/lib/ChangeEventPlugin.js +0 -174
  438. data/public/vendor/npm/react@0.13.3/lib/ClientReactRootIndex.js +0 -23
  439. data/public/vendor/npm/react@0.13.3/lib/DOMChildrenOperations.js +0 -57
  440. data/public/vendor/npm/react@0.13.3/lib/DOMProperty.js +0 -96
  441. data/public/vendor/npm/react@0.13.3/lib/DOMPropertyOperations.js +0 -99
  442. data/public/vendor/npm/react@0.13.3/lib/Danger.js +0 -67
  443. data/public/vendor/npm/react@0.13.3/lib/DefaultEventPluginOrder.js +0 -5
  444. data/public/vendor/npm/react@0.13.3/lib/EnterLeaveEventPlugin.js +0 -69
  445. data/public/vendor/npm/react@0.13.3/lib/EventConstants.js +0 -55
  446. data/public/vendor/npm/react@0.13.3/lib/EventListener.js +0 -34
  447. data/public/vendor/npm/react@0.13.3/lib/EventPluginHub.js +0 -103
  448. data/public/vendor/npm/react@0.13.3/lib/EventPluginRegistry.js +0 -115
  449. data/public/vendor/npm/react@0.13.3/lib/EventPluginUtils.js +0 -121
  450. data/public/vendor/npm/react@0.13.3/lib/EventPropagators.js +0 -62
  451. data/public/vendor/npm/react@0.13.3/lib/ExecutionEnvironment.js +0 -42
  452. data/public/vendor/npm/react@0.13.3/lib/FallbackCompositionState.js +0 -45
  453. data/public/vendor/npm/react@0.13.3/lib/HTMLDOMPropertyConfig.js +0 -155
  454. data/public/vendor/npm/react@0.13.3/lib/LinkedStateMixin.js +0 -8
  455. data/public/vendor/npm/react@0.13.3/lib/LinkedValueUtils.js +0 -74
  456. data/public/vendor/npm/react@0.13.3/lib/LocalEventTrapMixin.js +0 -26
  457. data/public/vendor/npm/react@0.13.3/lib/MobileSafariClickEventPlugin.js +0 -17
  458. data/public/vendor/npm/react@0.13.3/lib/Object.assign.js +0 -47
  459. data/public/vendor/npm/react@0.13.3/lib/PooledClass.js +0 -75
  460. data/public/vendor/npm/react@0.13.3/lib/React.js +0 -93
  461. data/public/vendor/npm/react@0.13.3/lib/ReactBrowserComponentMixin.js +0 -7
  462. data/public/vendor/npm/react@0.13.3/lib/ReactBrowserEventEmitter.js +0 -136
  463. data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroup.js +0 -34
  464. data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroupChild.js +0 -92
  465. data/public/vendor/npm/react@0.13.3/lib/ReactChildReconciler.js +0 -57
  466. data/public/vendor/npm/react@0.13.3/lib/ReactChildren.js +0 -67
  467. data/public/vendor/npm/react@0.13.3/lib/ReactClass.js +0 -338
  468. data/public/vendor/npm/react@0.13.3/lib/ReactComponent.js +0 -50
  469. data/public/vendor/npm/react@0.13.3/lib/ReactComponentBrowserEnvironment.js +0 -14
  470. data/public/vendor/npm/react@0.13.3/lib/ReactComponentEnvironment.js +0 -19
  471. data/public/vendor/npm/react@0.13.3/lib/ReactComponentWithPureRenderMixin.js +0 -7
  472. data/public/vendor/npm/react@0.13.3/lib/ReactCompositeComponent.js +0 -374
  473. data/public/vendor/npm/react@0.13.3/lib/ReactContext.js +0 -27
  474. data/public/vendor/npm/react@0.13.3/lib/ReactCurrentOwner.js +0 -32
  475. data/public/vendor/npm/react@0.13.3/lib/ReactDOM.js +0 -146
  476. data/public/vendor/npm/react@0.13.3/lib/ReactDOMButton.js +0 -35
  477. data/public/vendor/npm/react@0.13.3/lib/ReactDOMComponent.js +0 -267
  478. data/public/vendor/npm/react@0.13.3/lib/ReactDOMForm.js +0 -21
  479. data/public/vendor/npm/react@0.13.3/lib/ReactDOMIDOperations.js +0 -63
  480. data/public/vendor/npm/react@0.13.3/lib/ReactDOMIframe.js +0 -20
  481. data/public/vendor/npm/react@0.13.3/lib/ReactDOMImg.js +0 -21
  482. data/public/vendor/npm/react@0.13.3/lib/ReactDOMInput.js +0 -94
  483. data/public/vendor/npm/react@0.13.3/lib/ReactDOMOption.js +0 -23
  484. data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelect.js +0 -112
  485. data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelection.js +0 -103
  486. data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextComponent.js +0 -38
  487. data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextarea.js +0 -70
  488. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultBatchingStrategy.js +0 -37
  489. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultInjection.js +0 -93
  490. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerf.js +0 -183
  491. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerfAnalysis.js +0 -145
  492. data/public/vendor/npm/react@0.13.3/lib/ReactElement.js +0 -151
  493. data/public/vendor/npm/react@0.13.3/lib/ReactElementValidator.js +0 -218
  494. data/public/vendor/npm/react@0.13.3/lib/ReactEmptyComponent.js +0 -47
  495. data/public/vendor/npm/react@0.13.3/lib/ReactErrorUtils.js +0 -30
  496. data/public/vendor/npm/react@0.13.3/lib/ReactEventEmitterMixin.js +0 -12
  497. data/public/vendor/npm/react@0.13.3/lib/ReactEventListener.js +0 -93
  498. data/public/vendor/npm/react@0.13.3/lib/ReactFragment.js +0 -110
  499. data/public/vendor/npm/react@0.13.3/lib/ReactInjection.js +0 -27
  500. data/public/vendor/npm/react@0.13.3/lib/ReactInputSelection.js +0 -75
  501. data/public/vendor/npm/react@0.13.3/lib/ReactInstanceHandles.js +0 -113
  502. data/public/vendor/npm/react@0.13.3/lib/ReactInstanceMap.js +0 -47
  503. data/public/vendor/npm/react@0.13.3/lib/ReactLifeCycle.js +0 -9
  504. data/public/vendor/npm/react@0.13.3/lib/ReactLink.js +0 -16
  505. data/public/vendor/npm/react@0.13.3/lib/ReactMarkupChecksum.js +0 -17
  506. data/public/vendor/npm/react@0.13.3/lib/ReactMount.js +0 -347
  507. data/public/vendor/npm/react@0.13.3/lib/ReactMultiChild.js +0 -190
  508. data/public/vendor/npm/react@0.13.3/lib/ReactMultiChildUpdateTypes.js +0 -10
  509. data/public/vendor/npm/react@0.13.3/lib/ReactNativeComponent.js +0 -53
  510. data/public/vendor/npm/react@0.13.3/lib/ReactOwner.js +0 -21
  511. data/public/vendor/npm/react@0.13.3/lib/ReactPerf.js +0 -42
  512. data/public/vendor/npm/react@0.13.3/lib/ReactPropTransferer.js +0 -40
  513. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocationNames.js +0 -13
  514. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocations.js +0 -9
  515. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypes.js +0 -225
  516. data/public/vendor/npm/react@0.13.3/lib/ReactPutListenerQueue.js +0 -31
  517. data/public/vendor/npm/react@0.13.3/lib/ReactReconcileTransaction.js +0 -66
  518. data/public/vendor/npm/react@0.13.3/lib/ReactReconciler.js +0 -44
  519. data/public/vendor/npm/react@0.13.3/lib/ReactRef.js +0 -36
  520. data/public/vendor/npm/react@0.13.3/lib/ReactRootIndex.js +0 -29
  521. data/public/vendor/npm/react@0.13.3/lib/ReactServerRendering.js +0 -44
  522. data/public/vendor/npm/react@0.13.3/lib/ReactServerRenderingTransaction.js +0 -47
  523. data/public/vendor/npm/react@0.13.3/lib/ReactStateSetters.js +0 -104
  524. data/public/vendor/npm/react@0.13.3/lib/ReactTestUtils.js +0 -249
  525. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionChildMapping.js +0 -53
  526. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionEvents.js +0 -68
  527. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionGroup.js +0 -140
  528. data/public/vendor/npm/react@0.13.3/lib/ReactUpdateQueue.js +0 -107
  529. data/public/vendor/npm/react@0.13.3/lib/ReactUpdates.js +0 -139
  530. data/public/vendor/npm/react@0.13.3/lib/ReactWithAddons.js +0 -30
  531. data/public/vendor/npm/react@0.13.3/lib/SVGDOMPropertyConfig.js +0 -76
  532. data/public/vendor/npm/react@0.13.3/lib/SelectEventPlugin.js +0 -91
  533. data/public/vendor/npm/react@0.13.3/lib/ServerReactRootIndex.js +0 -29
  534. data/public/vendor/npm/react@0.13.3/lib/SimpleEventPlugin.js +0 -287
  535. data/public/vendor/npm/react@0.13.3/lib/SyntheticClipboardEvent.js +0 -11
  536. data/public/vendor/npm/react@0.13.3/lib/SyntheticCompositionEvent.js +0 -9
  537. data/public/vendor/npm/react@0.13.3/lib/SyntheticDragEvent.js +0 -9
  538. data/public/vendor/npm/react@0.13.3/lib/SyntheticEvent.js +0 -90
  539. data/public/vendor/npm/react@0.13.3/lib/SyntheticFocusEvent.js +0 -9
  540. data/public/vendor/npm/react@0.13.3/lib/SyntheticInputEvent.js +0 -9
  541. data/public/vendor/npm/react@0.13.3/lib/SyntheticKeyboardEvent.js +0 -43
  542. data/public/vendor/npm/react@0.13.3/lib/SyntheticMouseEvent.js +0 -38
  543. data/public/vendor/npm/react@0.13.3/lib/SyntheticTouchEvent.js +0 -19
  544. data/public/vendor/npm/react@0.13.3/lib/SyntheticUIEvent.js +0 -29
  545. data/public/vendor/npm/react@0.13.3/lib/SyntheticWheelEvent.js +0 -18
  546. data/public/vendor/npm/react@0.13.3/lib/Transaction.js +0 -90
  547. data/public/vendor/npm/react@0.13.3/lib/ViewportMetrics.js +0 -27
  548. data/public/vendor/npm/react@0.13.3/lib/accumulateInto.js +0 -26
  549. data/public/vendor/npm/react@0.13.3/lib/adler32.js +0 -32
  550. data/public/vendor/npm/react@0.13.3/lib/camelize.js +0 -30
  551. data/public/vendor/npm/react@0.13.3/lib/camelizeStyleName.js +0 -8
  552. data/public/vendor/npm/react@0.13.3/lib/cloneWithProps.js +0 -20
  553. data/public/vendor/npm/react@0.13.3/lib/containsNode.js +0 -20
  554. data/public/vendor/npm/react@0.13.3/lib/createArrayFromMixed.js +0 -15
  555. data/public/vendor/npm/react@0.13.3/lib/createFullPageComponent.js +0 -22
  556. data/public/vendor/npm/react@0.13.3/lib/createNodesFromMarkup.js +0 -39
  557. data/public/vendor/npm/react@0.13.3/lib/cx.js +0 -20
  558. data/public/vendor/npm/react@0.13.3/lib/dangerousStyleValue.js +0 -19
  559. data/public/vendor/npm/react@0.13.3/lib/emptyFunction.js +0 -32
  560. data/public/vendor/npm/react@0.13.3/lib/emptyObject.js +0 -9
  561. data/public/vendor/npm/react@0.13.3/lib/escapeTextContentForBrowser.js +0 -38
  562. data/public/vendor/npm/react@0.13.3/lib/findDOMNode.js +0 -31
  563. data/public/vendor/npm/react@0.13.3/lib/flattenChildren.js +0 -25
  564. data/public/vendor/npm/react@0.13.3/lib/focusNode.js +0 -27
  565. data/public/vendor/npm/react@0.13.3/lib/forEachAccumulated.js +0 -29
  566. data/public/vendor/npm/react@0.13.3/lib/getActiveElement.js +0 -27
  567. data/public/vendor/npm/react@0.13.3/lib/getEventCharCode.js +0 -50
  568. data/public/vendor/npm/react@0.13.3/lib/getEventKey.js +0 -72
  569. data/public/vendor/npm/react@0.13.3/lib/getEventModifierState.js +0 -45
  570. data/public/vendor/npm/react@0.13.3/lib/getEventTarget.js +0 -29
  571. data/public/vendor/npm/react@0.13.3/lib/getIteratorFn.js +0 -42
  572. data/public/vendor/npm/react@0.13.3/lib/getMarkupWrap.js +0 -73
  573. data/public/vendor/npm/react@0.13.3/lib/getNodeForCharacterOffset.js +0 -73
  574. data/public/vendor/npm/react@0.13.3/lib/getReactRootElementInContainer.js +0 -33
  575. data/public/vendor/npm/react@0.13.3/lib/getTextContentAccessor.js +0 -11
  576. data/public/vendor/npm/react@0.13.3/lib/getUnboundedScrollPosition.js +0 -38
  577. data/public/vendor/npm/react@0.13.3/lib/hyphenate.js +0 -31
  578. data/public/vendor/npm/react@0.13.3/lib/hyphenateStyleName.js +0 -8
  579. data/public/vendor/npm/react@0.13.3/lib/instantiateReactComponent.js +0 -55
  580. data/public/vendor/npm/react@0.13.3/lib/invariant.js +0 -26
  581. data/public/vendor/npm/react@0.13.3/lib/isEventSupported.js +0 -24
  582. data/public/vendor/npm/react@0.13.3/lib/isNode.js +0 -25
  583. data/public/vendor/npm/react@0.13.3/lib/isTextInputElement.js +0 -41
  584. data/public/vendor/npm/react@0.13.3/lib/isTextNode.js +0 -6
  585. data/public/vendor/npm/react@0.13.3/lib/joinClasses.js +0 -39
  586. data/public/vendor/npm/react@0.13.3/lib/keyMirror.js +0 -18
  587. data/public/vendor/npm/react@0.13.3/lib/keyOf.js +0 -34
  588. data/public/vendor/npm/react@0.13.3/lib/mapObject.js +0 -51
  589. data/public/vendor/npm/react@0.13.3/lib/memoizeStringOnly.js +0 -31
  590. data/public/vendor/npm/react@0.13.3/lib/onlyChild.js +0 -11
  591. data/public/vendor/npm/react@0.13.3/lib/performance.js +0 -8
  592. data/public/vendor/npm/react@0.13.3/lib/performanceNow.js +0 -7
  593. data/public/vendor/npm/react@0.13.3/lib/quoteAttributeValueForBrowser.js +0 -7
  594. data/public/vendor/npm/react@0.13.3/lib/setInnerHTML.js +0 -40
  595. data/public/vendor/npm/react@0.13.3/lib/setTextContent.js +0 -16
  596. data/public/vendor/npm/react@0.13.3/lib/shallowEqual.js +0 -42
  597. data/public/vendor/npm/react@0.13.3/lib/shouldUpdateReactComponent.js +0 -51
  598. data/public/vendor/npm/react@0.13.3/lib/toArray.js +0 -21
  599. data/public/vendor/npm/react@0.13.3/lib/traverseAllChildren.js +0 -104
  600. data/public/vendor/npm/react@0.13.3/lib/update.js +0 -78
  601. data/public/vendor/npm/react@0.13.3/lib/warning.js +0 -34
  602. data/public/vendor/npm/react@0.13.3/package.json +0 -34
  603. data/public/vendor/npm/react@0.13.3/react.js +0 -2
  604. data/public/vendor/npm/react@0.13.3.js +0 -1
  605. data/public/vendor/npm/readable-stream@1.1.13/duplex.js +0 -2
  606. data/public/vendor/npm/readable-stream@1.1.13/passthrough.js +0 -2
  607. data/public/vendor/npm/readable-stream@1.1.13/readable.js +0 -8
  608. data/public/vendor/npm/readable-stream@1.1.13/transform.js +0 -2
  609. data/public/vendor/npm/readable-stream@1.1.13/writable.js +0 -2
  610. data/public/vendor/npm/readable-stream@1.1.13.js +0 -1
  611. data/public/vendor/npm/source-map@0.1.31/CHANGELOG.md +0 -112
  612. data/public/vendor/npm/source-map@0.1.31/LICENSE +0 -28
  613. data/public/vendor/npm/source-map@0.1.31/Makefile.dryice.js +0 -89
  614. data/public/vendor/npm/source-map@0.1.31/README.md +0 -434
  615. data/public/vendor/npm/source-map@0.1.31/build/assert-shim.js +0 -58
  616. data/public/vendor/npm/source-map@0.1.31/build/mini-require.js +0 -154
  617. data/public/vendor/npm/source-map@0.1.31/build/prefix-source-map.jsm +0 -20
  618. data/public/vendor/npm/source-map@0.1.31/build/prefix-utils.jsm +0 -18
  619. data/public/vendor/npm/source-map@0.1.31/build/suffix-browser.js +0 -8
  620. data/public/vendor/npm/source-map@0.1.31/build/suffix-source-map.jsm +0 -6
  621. data/public/vendor/npm/source-map@0.1.31/build/suffix-utils.jsm +0 -21
  622. data/public/vendor/npm/source-map@0.1.31/build/test-prefix.js +0 -10
  623. data/public/vendor/npm/source-map@0.1.31/build/test-suffix.js +0 -5
  624. data/public/vendor/npm/source-map@0.1.31/lib/source-map/array-set.js +0 -49
  625. data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64-vlq.js +0 -56
  626. data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64.js +0 -44
  627. data/public/vendor/npm/source-map@0.1.31/lib/source-map/binary-search.js +0 -83
  628. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-consumer.js +0 -238
  629. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-generator.js +0 -231
  630. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-node.js +0 -234
  631. data/public/vendor/npm/source-map@0.1.31/lib/source-map/util.js +0 -207
  632. data/public/vendor/npm/source-map@0.1.31/lib/source-map.js +0 -4
  633. data/public/vendor/npm/source-map@0.1.31/package.json +0 -52
  634. data/public/vendor/npm/source-map@0.1.31/test/run-tests.js +0 -50
  635. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-api.js +0 -19
  636. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-array-set.js +0 -84
  637. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64-vlq.js +0 -17
  638. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64.js +0 -26
  639. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-binary-search.js +0 -37
  640. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-dog-fooding.js +0 -76
  641. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-consumer.js +0 -426
  642. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-generator.js +0 -480
  643. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-node.js +0 -307
  644. data/public/vendor/npm/source-map@0.1.31/test/source-map/util.js +0 -84
  645. data/public/vendor/npm/source-map@0.1.31.js +0 -1
  646. data/public/vendor/npm/through@2.3.8/LICENSE.APACHE2 +0 -15
  647. data/public/vendor/npm/through@2.3.8/LICENSE.MIT +0 -24
  648. data/public/vendor/npm/through@2.3.8/index.js +0 -93
  649. data/public/vendor/npm/through@2.3.8/package.json +0 -36
  650. data/public/vendor/npm/through@2.3.8/readme.markdown +0 -64
  651. data/public/vendor/npm/through@2.3.8/test/async.js +0 -26
  652. data/public/vendor/npm/through@2.3.8/test/auto-destroy.js +0 -26
  653. data/public/vendor/npm/through@2.3.8/test/buffering.js +0 -57
  654. data/public/vendor/npm/through@2.3.8/test/end.js +0 -37
  655. data/public/vendor/npm/through@2.3.8/test/index.js +0 -98
  656. data/public/vendor/npm/through@2.3.8/test.js +0 -2
  657. data/public/vendor/npm/through@2.3.8.js +0 -1
  658. data/views/_options.erb +0 -156
  659. /data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-buffer@0.1.1}/index.js +0 -0
  660. /data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/index.js +0 -0
  661. /data/public/vendor/npm/{readable-stream@1.1.13 → assert@1.5.0}/LICENSE +0 -0
  662. /data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/LICENSE +0 -0
  663. /data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/README.md +0 -0
  664. /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/LICENSE +0 -0
  665. /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/index.js +0 -0
  666. /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/README.md +0 -0
  667. /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/float.patch +0 -0
@@ -1,7 +1,7 @@
1
- /* */
2
- (function(process) {
3
- module("event", {teardown: moduleTeardown});
4
- test("null or undefined handler", function() {
1
+ /* */
2
+ (function (process) {
3
+ module("event", { teardown: moduleTeardown });
4
+ test("null or undefined handler", function () {
5
5
  expect(2);
6
6
  try {
7
7
  jQuery("#firstp").click(null);
@@ -12,8 +12,8 @@
12
12
  ok(true, "Passing an undefined handler will not throw an exception");
13
13
  } catch (e) {}
14
14
  });
15
- test("bind(),live(),delegate() with non-null,defined data", function() {
16
- var handler = function(event, data) {
15
+ test("bind(),live(),delegate() with non-null,defined data", function () {
16
+ var handler = function (event, data) {
17
17
  equal(data, 0, "non-null, defined data (zero) is correctly passed");
18
18
  };
19
19
  jQuery("#foo").bind("foo", handler);
@@ -24,89 +24,135 @@
24
24
  jQuery("#foo").die("foo", handler);
25
25
  jQuery("div").undelegate("#foo", "foo");
26
26
  });
27
- test("Handler changes and .trigger() order", function() {
27
+ test("Handler changes and .trigger() order", function () {
28
28
  expect(1);
29
- var markup = jQuery("<div><div><p><span><b class=\"a\">b</b></span></p></div></div>"),
30
- path = "";
31
- markup.find("*").andSelf().on("click", function(e) {
32
- path += this.nodeName.toLowerCase() + " ";
33
- }).filter("b").on("click", function(e) {
34
- if (e.target === this) {
35
- jQuery(this).parent().remove();
36
- }
37
- });
29
+ var markup = jQuery(
30
+ '<div><div><p><span><b class="a">b</b></span></p></div></div>'
31
+ ),
32
+ path = "";
33
+ markup
34
+ .find("*")
35
+ .andSelf()
36
+ .on("click", function (e) {
37
+ path += this.nodeName.toLowerCase() + " ";
38
+ })
39
+ .filter("b")
40
+ .on("click", function (e) {
41
+ if (e.target === this) {
42
+ jQuery(this).parent().remove();
43
+ }
44
+ });
38
45
  markup.find("b").trigger("click");
39
46
  equal(path, "b p div div ", "Delivered all events");
40
47
  markup.remove();
41
48
  });
42
- test("bind(), with data", function() {
49
+ test("bind(), with data", function () {
43
50
  expect(4);
44
- var handler = function(event) {
51
+ var handler = function (event) {
45
52
  ok(event.data, "bind() with data, check passed data exists");
46
- equal(event.data["foo"], "bar", "bind() with data, Check value of passed data");
53
+ equal(
54
+ event.data["foo"],
55
+ "bar",
56
+ "bind() with data, Check value of passed data"
57
+ );
47
58
  };
48
- jQuery("#firstp").bind("click", {"foo": "bar"}, handler).click().unbind("click", handler);
49
- ok(!jQuery._data(jQuery("#firstp")[0], "events"), "Event handler unbound when using data.");
50
- var test = function() {};
51
- var handler2 = function(event) {
52
- equal(event.data, test, "bind() with function data, Check value of passed data");
59
+ jQuery("#firstp")
60
+ .bind("click", { foo: "bar" }, handler)
61
+ .click()
62
+ .unbind("click", handler);
63
+ ok(
64
+ !jQuery._data(jQuery("#firstp")[0], "events"),
65
+ "Event handler unbound when using data."
66
+ );
67
+ var test = function () {};
68
+ var handler2 = function (event) {
69
+ equal(
70
+ event.data,
71
+ test,
72
+ "bind() with function data, Check value of passed data"
73
+ );
53
74
  };
54
- jQuery("#firstp").bind("click", test, handler2).click().unbind("click", handler2);
75
+ jQuery("#firstp")
76
+ .bind("click", test, handler2)
77
+ .click()
78
+ .unbind("click", handler2);
55
79
  });
56
- test("click(), with data", function() {
80
+ test("click(), with data", function () {
57
81
  expect(3);
58
- var handler = function(event) {
82
+ var handler = function (event) {
59
83
  ok(event.data, "bind() with data, check passed data exists");
60
- equal(event.data["foo"], "bar", "bind() with data, Check value of passed data");
84
+ equal(
85
+ event.data["foo"],
86
+ "bar",
87
+ "bind() with data, Check value of passed data"
88
+ );
61
89
  };
62
- jQuery("#firstp").click({"foo": "bar"}, handler).click().unbind("click", handler);
63
- ok(!jQuery._data(jQuery("#firstp")[0], "events"), "Event handler unbound when using data.");
64
- });
65
- test("bind(), with data, trigger with data", function() {
90
+ jQuery("#firstp")
91
+ .click({ foo: "bar" }, handler)
92
+ .click()
93
+ .unbind("click", handler);
94
+ ok(
95
+ !jQuery._data(jQuery("#firstp")[0], "events"),
96
+ "Event handler unbound when using data."
97
+ );
98
+ });
99
+ test("bind(), with data, trigger with data", function () {
66
100
  expect(4);
67
- var handler = function(event, data) {
101
+ var handler = function (event, data) {
68
102
  ok(event.data, "check passed data exists");
69
103
  equal(event.data.foo, "bar", "Check value of passed data");
70
104
  ok(data, "Check trigger data");
71
105
  equal(data.bar, "foo", "Check value of trigger data");
72
106
  };
73
- jQuery("#firstp").bind("click", {foo: "bar"}, handler).trigger("click", [{bar: "foo"}]).unbind("click", handler);
107
+ jQuery("#firstp")
108
+ .bind("click", { foo: "bar" }, handler)
109
+ .trigger("click", [{ bar: "foo" }])
110
+ .unbind("click", handler);
74
111
  });
75
- test("bind(), multiple events at once", function() {
112
+ test("bind(), multiple events at once", function () {
76
113
  expect(2);
77
114
  var clickCounter = 0,
78
- mouseoverCounter = 0;
79
- var handler = function(event) {
115
+ mouseoverCounter = 0;
116
+ var handler = function (event) {
80
117
  if (event.type == "click") {
81
118
  clickCounter += 1;
82
119
  } else if (event.type == "mouseover") {
83
120
  mouseoverCounter += 1;
84
121
  }
85
122
  };
86
- jQuery("#firstp").bind("click mouseover", handler).trigger("click").trigger("mouseover");
123
+ jQuery("#firstp")
124
+ .bind("click mouseover", handler)
125
+ .trigger("click")
126
+ .trigger("mouseover");
87
127
  equal(clickCounter, 1, "bind() with multiple events at once");
88
128
  equal(mouseoverCounter, 1, "bind() with multiple events at once");
89
129
  });
90
- test("bind(), five events at once", function() {
130
+ test("bind(), five events at once", function () {
91
131
  expect(1);
92
132
  var count = 0,
93
- handler = function(event) {
94
- count++;
95
- };
96
- jQuery("#firstp").bind("click mouseover foo bar baz", handler).trigger("click").trigger("mouseover").trigger("foo").trigger("bar").trigger("baz");
133
+ handler = function (event) {
134
+ count++;
135
+ };
136
+ jQuery("#firstp")
137
+ .bind("click mouseover foo bar baz", handler)
138
+ .trigger("click")
139
+ .trigger("mouseover")
140
+ .trigger("foo")
141
+ .trigger("bar")
142
+ .trigger("baz");
97
143
  equal(count, 5, "bind() five events at once");
98
144
  });
99
- test("bind(), multiple events at once and namespaces", function() {
145
+ test("bind(), multiple events at once and namespaces", function () {
100
146
  expect(7);
101
147
  var cur,
102
- obj = {};
103
- var div = jQuery("<div/>").bind("focusin.a", function(e) {
148
+ obj = {};
149
+ var div = jQuery("<div/>").bind("focusin.a", function (e) {
104
150
  equal(e.type, cur, "Verify right single event was fired.");
105
151
  });
106
152
  cur = "focusin";
107
153
  div.trigger("focusin.a");
108
154
  div.remove();
109
- div = jQuery("<div/>").bind("click mouseover", obj, function(e) {
155
+ div = jQuery("<div/>").bind("click mouseover", obj, function (e) {
110
156
  equal(e.type, cur, "Verify right multi event was fired.");
111
157
  equal(e.data, obj, "Make sure the data came in correctly.");
112
158
  });
@@ -115,7 +161,7 @@
115
161
  cur = "mouseover";
116
162
  div.trigger("mouseover");
117
163
  div.remove();
118
- div = jQuery("<div/>").bind("focusin.a focusout.b", function(e) {
164
+ div = jQuery("<div/>").bind("focusin.a focusout.b", function (e) {
119
165
  equal(e.type, cur, "Verify right multi event was fired.");
120
166
  });
121
167
  cur = "focusin";
@@ -124,63 +170,67 @@
124
170
  div.trigger("focusout.b");
125
171
  div.remove();
126
172
  });
127
- test("bind(), namespace with special add", function() {
173
+ test("bind(), namespace with special add", function () {
128
174
  expect(27);
129
- var div = jQuery("<div/>").bind("test", function(e) {
175
+ var div = jQuery("<div/>").bind("test", function (e) {
130
176
  ok(true, "Test event fired.");
131
177
  });
132
178
  var i = 0;
133
179
  jQuery.event.special["test"] = {
134
- _default: function(e, data) {
180
+ _default: function (e, data) {
135
181
  equal(this, document, "Make sure we're at the top of the chain.");
136
- equal(e.type, "test", "And that we're still dealing with a test event.");
182
+ equal(
183
+ e.type,
184
+ "test",
185
+ "And that we're still dealing with a test event."
186
+ );
137
187
  equal(e.target, div[0], "And that the target is correct.");
138
188
  ok(data !== undefined, "And that trigger data was passed.");
139
189
  },
140
- setup: function() {},
141
- teardown: function() {
190
+ setup: function () {},
191
+ teardown: function () {
142
192
  ok(true, "Teardown called.");
143
193
  },
144
- add: function(handleObj) {
194
+ add: function (handleObj) {
145
195
  var handler = handleObj.handler;
146
- handleObj.handler = function(e) {
196
+ handleObj.handler = function (e) {
147
197
  e.xyz = ++i;
148
198
  handler.apply(this, arguments);
149
199
  };
150
200
  },
151
- remove: function() {
201
+ remove: function () {
152
202
  ok(true, "Remove called.");
153
- }
203
+ },
154
204
  };
155
- div.bind("test.a", {"x": 1}, function(e) {
205
+ div.bind("test.a", { x: 1 }, function (e) {
156
206
  ok(!!e.xyz, "Make sure that the data is getting passed through.");
157
207
  equal(e.data["x"], 1, "Make sure data is attached properly.");
158
208
  });
159
- div.bind("test.b", {"x": 2}, function(e) {
209
+ div.bind("test.b", { x: 2 }, function (e) {
160
210
  ok(!!e.xyz, "Make sure that the data is getting passed through.");
161
211
  equal(e.data["x"], 2, "Make sure data is attached properly.");
162
212
  });
163
213
  div.trigger("test", 33.33);
164
214
  div.trigger("test.a", "George Harrison");
165
- div.trigger("test.b", {year: 1982});
215
+ div.trigger("test.b", { year: 1982 });
166
216
  div.unbind("test");
167
- div = jQuery("<div/>").bind("test", function(e) {
217
+ div = jQuery("<div/>").bind("test", function (e) {
168
218
  ok(true, "Test event fired.");
169
219
  });
170
220
  div.appendTo("#qunit-fixture").remove();
171
221
  delete jQuery.event.special["test"];
172
222
  });
173
- test("bind(), no data", function() {
223
+ test("bind(), no data", function () {
174
224
  expect(1);
175
- var handler = function(event) {
225
+ var handler = function (event) {
176
226
  ok(!event.data, "Check that no data is added to the event object");
177
227
  };
178
228
  jQuery("#firstp").bind("click", handler).trigger("click");
179
229
  });
180
- test("bind/one/unbind(Object)", function() {
230
+ test("bind/one/unbind(Object)", function () {
181
231
  expect(6);
182
232
  var clickCounter = 0,
183
- mouseoverCounter = 0;
233
+ mouseoverCounter = 0;
184
234
  function handler(event) {
185
235
  if (event.type == "click") {
186
236
  clickCounter++;
@@ -198,13 +248,18 @@
198
248
  function trigger() {
199
249
  $elem.trigger("click").trigger("mouseover");
200
250
  }
201
- var $elem = jQuery("#firstp").bind({
202
- "click": handler,
203
- "mouseover": handler
204
- }).one({
205
- "click": handlerWithData,
206
- "mouseover": handlerWithData
207
- }, 2);
251
+ var $elem = jQuery("#firstp")
252
+ .bind({
253
+ click: handler,
254
+ mouseover: handler,
255
+ })
256
+ .one(
257
+ {
258
+ click: handlerWithData,
259
+ mouseover: handlerWithData,
260
+ },
261
+ 2
262
+ );
208
263
  trigger();
209
264
  equal(clickCounter, 3, "bind(Object)");
210
265
  equal(mouseoverCounter, 3, "bind(Object)");
@@ -212,26 +267,26 @@
212
267
  equal(clickCounter, 4, "bind(Object)");
213
268
  equal(mouseoverCounter, 4, "bind(Object)");
214
269
  jQuery("#firstp").unbind({
215
- "click": handler,
216
- "mouseover": handler
270
+ click: handler,
271
+ mouseover: handler,
217
272
  });
218
273
  trigger();
219
274
  equal(clickCounter, 4, "bind(Object)");
220
275
  equal(mouseoverCounter, 4, "bind(Object)");
221
276
  });
222
- test("live/die(Object), delegate/undelegate(String, Object)", function() {
277
+ test("live/die(Object), delegate/undelegate(String, Object)", function () {
223
278
  expect(6);
224
279
  var clickCounter = 0,
225
- mouseoverCounter = 0,
226
- $p = jQuery("#firstp"),
227
- $a = $p.find("a:first");
280
+ mouseoverCounter = 0,
281
+ $p = jQuery("#firstp"),
282
+ $a = $p.find("a:first");
228
283
  var events = {
229
- "click": function(event) {
230
- clickCounter += (event.data || 1);
284
+ click: function (event) {
285
+ clickCounter += event.data || 1;
286
+ },
287
+ mouseover: function (event) {
288
+ mouseoverCounter += event.data || 1;
231
289
  },
232
- "mouseover": function(event) {
233
- mouseoverCounter += (event.data || 1);
234
- }
235
290
  };
236
291
  function trigger() {
237
292
  $a.trigger("click").trigger("mouseover");
@@ -250,133 +305,182 @@
250
305
  equal(clickCounter, 4, "die");
251
306
  equal(mouseoverCounter, 4, "die");
252
307
  });
253
- test("live/delegate immediate propagation", function() {
308
+ test("live/delegate immediate propagation", function () {
254
309
  expect(2);
255
310
  var $p = jQuery("#firstp"),
256
- $a = $p.find("a:first"),
257
- lastClick;
311
+ $a = $p.find("a:first"),
312
+ lastClick;
258
313
  lastClick = "";
259
- $a.live("click", function(e) {
314
+ $a.live("click", function (e) {
260
315
  lastClick = "click1";
261
316
  e.stopImmediatePropagation();
262
317
  });
263
- $a.live("click", function(e) {
318
+ $a.live("click", function (e) {
264
319
  lastClick = "click2";
265
320
  });
266
321
  $a.trigger("click");
267
322
  equal(lastClick, "click1", "live stopImmediatePropagation");
268
323
  $a.die("click");
269
324
  lastClick = "";
270
- $p.delegate("a", "click", function(e) {
325
+ $p.delegate("a", "click", function (e) {
271
326
  lastClick = "click1";
272
327
  e.stopImmediatePropagation();
273
328
  });
274
- $p.delegate("a", "click", function(e) {
329
+ $p.delegate("a", "click", function (e) {
275
330
  lastClick = "click2";
276
331
  });
277
332
  $a.trigger("click");
278
333
  equal(lastClick, "click1", "delegate stopImmediatePropagation");
279
334
  $p.undelegate("click");
280
335
  });
281
- test("bind/delegate bubbling, isDefaultPrevented", function() {
336
+ test("bind/delegate bubbling, isDefaultPrevented", function () {
282
337
  expect(2);
283
338
  var $anchor2 = jQuery("#anchor2"),
284
- $main = jQuery("#qunit-fixture"),
285
- fakeClick = function($jq) {
286
- if (document.createEvent) {
287
- var e = document.createEvent("MouseEvents");
288
- e.initEvent("click", true, true);
289
- $jq[0].dispatchEvent(e);
290
- } else if ($jq[0].click) {
291
- $jq[0].click();
292
- }
293
- };
294
- $anchor2.click(function(e) {
339
+ $main = jQuery("#qunit-fixture"),
340
+ fakeClick = function ($jq) {
341
+ if (document.createEvent) {
342
+ var e = document.createEvent("MouseEvents");
343
+ e.initEvent("click", true, true);
344
+ $jq[0].dispatchEvent(e);
345
+ } else if ($jq[0].click) {
346
+ $jq[0].click();
347
+ }
348
+ };
349
+ $anchor2.click(function (e) {
295
350
  e.preventDefault();
296
351
  });
297
- $main.delegate("#foo", "click", function(e) {
352
+ $main.delegate("#foo", "click", function (e) {
298
353
  var orig = e.originalEvent;
299
- if (typeof(orig.defaultPrevented) === "boolean" || typeof(orig.returnValue) === "boolean" || orig["getPreventDefault"]) {
300
- equal(e.isDefaultPrevented(), true, "isDefaultPrevented true passed to bubbled event");
354
+ if (
355
+ typeof orig.defaultPrevented === "boolean" ||
356
+ typeof orig.returnValue === "boolean" ||
357
+ orig["getPreventDefault"]
358
+ ) {
359
+ equal(
360
+ e.isDefaultPrevented(),
361
+ true,
362
+ "isDefaultPrevented true passed to bubbled event"
363
+ );
301
364
  } else {
302
- ok(true, "isDefaultPrevented not supported by this browser, test skipped");
365
+ ok(
366
+ true,
367
+ "isDefaultPrevented not supported by this browser, test skipped"
368
+ );
303
369
  }
304
370
  });
305
371
  fakeClick($anchor2);
306
372
  $anchor2.unbind("click");
307
373
  $main.undelegate("click");
308
- $anchor2.click(function(e) {});
309
- $main.delegate("#foo", "click", function(e) {
310
- equal(e.isDefaultPrevented(), false, "isDefaultPrevented false passed to bubbled event");
374
+ $anchor2.click(function (e) {});
375
+ $main.delegate("#foo", "click", function (e) {
376
+ equal(
377
+ e.isDefaultPrevented(),
378
+ false,
379
+ "isDefaultPrevented false passed to bubbled event"
380
+ );
311
381
  });
312
382
  fakeClick($anchor2);
313
383
  $anchor2.unbind("click");
314
384
  $main.undelegate("click");
315
385
  });
316
- test("bind(), iframes", function() {
386
+ test("bind(), iframes", function () {
317
387
  var doc = jQuery("#loadediframe").contents();
318
- jQuery("div", doc).bind("click", function() {
319
- ok(true, "Binding to element inside iframe");
320
- }).click().unbind("click");
321
- });
322
- test("bind(), trigger change on select", function() {
388
+ jQuery("div", doc)
389
+ .bind("click", function () {
390
+ ok(true, "Binding to element inside iframe");
391
+ })
392
+ .click()
393
+ .unbind("click");
394
+ });
395
+ test("bind(), trigger change on select", function () {
323
396
  expect(5);
324
397
  var counter = 0;
325
398
  function selectOnChange(event) {
326
399
  equal(event.data, counter++, "Event.data is not a global event object");
327
400
  }
328
- jQuery("#form select").each(function(i) {
329
- jQuery(this).bind("change", i, selectOnChange);
330
- }).trigger("change");
401
+ jQuery("#form select")
402
+ .each(function (i) {
403
+ jQuery(this).bind("change", i, selectOnChange);
404
+ })
405
+ .trigger("change");
331
406
  });
332
- test("bind(), namespaced events, cloned events", 18, function() {
407
+ test("bind(), namespaced events, cloned events", 18, function () {
333
408
  var firstp = jQuery("#firstp");
334
- firstp.bind("custom.test", function(e) {
409
+ firstp.bind("custom.test", function (e) {
335
410
  ok(false, "Custom event triggered");
336
411
  });
337
- firstp.bind("click", function(e) {
412
+ firstp.bind("click", function (e) {
338
413
  ok(true, "Normal click triggered");
339
- equal(e.type + e.namespace, "click", "Check that only click events trigger this fn");
414
+ equal(
415
+ e.type + e.namespace,
416
+ "click",
417
+ "Check that only click events trigger this fn"
418
+ );
340
419
  });
341
- firstp.bind("click.test", function(e) {
420
+ firstp.bind("click.test", function (e) {
342
421
  var check = "click";
343
422
  ok(true, "Namespaced click triggered");
344
423
  if (e.namespace) {
345
424
  check += "test";
346
425
  }
347
- equal(e.type + e.namespace, check, "Check that only click/click.test events trigger this fn");
348
- });
349
- firstp = firstp.add(firstp.clone(true).attr("id", "firstp2").insertBefore(firstp));
426
+ equal(
427
+ e.type + e.namespace,
428
+ check,
429
+ "Check that only click/click.test events trigger this fn"
430
+ );
431
+ });
432
+ firstp = firstp.add(
433
+ firstp.clone(true).attr("id", "firstp2").insertBefore(firstp)
434
+ );
350
435
  firstp.trigger("click");
351
436
  firstp.trigger("click.test");
352
437
  firstp.unbind("click.test");
353
438
  firstp.trigger("click");
354
439
  firstp.unbind(".test");
355
440
  firstp.trigger("custom");
356
- jQuery("#nonnodes").contents().bind("tester", function() {
357
- equal(this.nodeType, 1, "Check node,textnode,comment bind just does real nodes");
358
- }).trigger("tester");
359
- jQuery("<a href='#fail' class='test'>test</a>").click(function() {
360
- return false;
361
- }).appendTo("#qunit-fixture");
362
- ok(jQuery("a.test:first").triggerHandler("click") === false, "Handler is bound to appendTo'd elements");
363
- });
364
- test("bind(), multi-namespaced events", function() {
441
+ jQuery("#nonnodes")
442
+ .contents()
443
+ .bind("tester", function () {
444
+ equal(
445
+ this.nodeType,
446
+ 1,
447
+ "Check node,textnode,comment bind just does real nodes"
448
+ );
449
+ })
450
+ .trigger("tester");
451
+ jQuery("<a href='#fail' class='test'>test</a>")
452
+ .click(function () {
453
+ return false;
454
+ })
455
+ .appendTo("#qunit-fixture");
456
+ ok(
457
+ jQuery("a.test:first").triggerHandler("click") === false,
458
+ "Handler is bound to appendTo'd elements"
459
+ );
460
+ });
461
+ test("bind(), multi-namespaced events", function () {
365
462
  expect(6);
366
- var order = ["click.test.abc", "click.test.abc", "click.test", "click.test.abc", "click.test", "custom.test2"];
463
+ var order = [
464
+ "click.test.abc",
465
+ "click.test.abc",
466
+ "click.test",
467
+ "click.test.abc",
468
+ "click.test",
469
+ "custom.test2",
470
+ ];
367
471
  function check(name, msg) {
368
472
  deepEqual(name, order.shift(), msg);
369
473
  }
370
- jQuery("#firstp").bind("custom.test", function(e) {
474
+ jQuery("#firstp").bind("custom.test", function (e) {
371
475
  check("custom.test", "Custom event triggered");
372
476
  });
373
- jQuery("#firstp").bind("custom.test2", function(e) {
477
+ jQuery("#firstp").bind("custom.test2", function (e) {
374
478
  check("custom.test2", "Custom event triggered");
375
479
  });
376
- jQuery("#firstp").bind("click.test", function(e) {
480
+ jQuery("#firstp").bind("click.test", function (e) {
377
481
  check("click.test", "Normal click triggered");
378
482
  });
379
- jQuery("#firstp").bind("click.test.abc", function(e) {
483
+ jQuery("#firstp").bind("click.test.abc", function (e) {
380
484
  check("click.test.abc", "Namespaced click triggered");
381
485
  });
382
486
  jQuery("#firstp").trigger("click.a.test");
@@ -389,12 +493,12 @@
389
493
  jQuery("#firstp").unbind(".test");
390
494
  jQuery("#firstp").trigger("custom");
391
495
  });
392
- test("bind(), with same function", function() {
496
+ test("bind(), with same function", function () {
393
497
  expect(2);
394
498
  var count = 0,
395
- func = function() {
396
- count++;
397
- };
499
+ func = function () {
500
+ count++;
501
+ };
398
502
  jQuery("#liveHandlerOrder").bind("foo.bar", func).bind("foo.zar", func);
399
503
  jQuery("#liveHandlerOrder").trigger("foo.bar");
400
504
  equal(count, 1, "Verify binding function with multiple namespaces.");
@@ -402,13 +506,13 @@
402
506
  jQuery("#liveHandlerOrder").trigger("foo.bar");
403
507
  equal(count, 1, "Verify that removing events still work.");
404
508
  });
405
- test("bind(), make sure order is maintained", function() {
509
+ test("bind(), make sure order is maintained", function () {
406
510
  expect(1);
407
511
  var elem = jQuery("#firstp"),
408
- log = [],
409
- check = [];
410
- jQuery.each(new Array(100), function(i) {
411
- elem.bind("click", function() {
512
+ log = [],
513
+ check = [];
514
+ jQuery.each(new Array(100), function (i) {
515
+ elem.bind("click", function () {
412
516
  log.push(i);
413
517
  });
414
518
  check.push(i);
@@ -417,24 +521,33 @@
417
521
  equal(log.join(","), check.join(","), "Make sure order was maintained.");
418
522
  elem.unbind("click");
419
523
  });
420
- test("bind(), with different this object", function() {
524
+ test("bind(), with different this object", function () {
421
525
  expect(4);
422
- var thisObject = {myThis: true},
423
- data = {myData: true},
424
- handler1 = function(event) {
425
- equal(this, thisObject, "bind() with different this object");
426
- },
427
- handler2 = function(event) {
428
- equal(this, thisObject, "bind() with different this object and data");
429
- equal(event.data, data, "bind() with different this object and data");
430
- };
431
- jQuery("#firstp").bind("click", jQuery.proxy(handler1, thisObject)).click().unbind("click", handler1).bind("click", data, jQuery.proxy(handler2, thisObject)).click().unbind("click", handler2);
432
- ok(!jQuery._data(jQuery("#firstp")[0], "events"), "Event handler unbound when using different this object and data.");
433
- });
434
- test("bind(name, false), unbind(name, false)", function() {
526
+ var thisObject = { myThis: true },
527
+ data = { myData: true },
528
+ handler1 = function (event) {
529
+ equal(this, thisObject, "bind() with different this object");
530
+ },
531
+ handler2 = function (event) {
532
+ equal(this, thisObject, "bind() with different this object and data");
533
+ equal(event.data, data, "bind() with different this object and data");
534
+ };
535
+ jQuery("#firstp")
536
+ .bind("click", jQuery.proxy(handler1, thisObject))
537
+ .click()
538
+ .unbind("click", handler1)
539
+ .bind("click", data, jQuery.proxy(handler2, thisObject))
540
+ .click()
541
+ .unbind("click", handler2);
542
+ ok(
543
+ !jQuery._data(jQuery("#firstp")[0], "events"),
544
+ "Event handler unbound when using different this object and data."
545
+ );
546
+ });
547
+ test("bind(name, false), unbind(name, false)", function () {
435
548
  expect(3);
436
549
  var main = 0;
437
- jQuery("#qunit-fixture").bind("click", function(e) {
550
+ jQuery("#qunit-fixture").bind("click", function (e) {
438
551
  main++;
439
552
  });
440
553
  jQuery("#ap").trigger("click");
@@ -449,10 +562,10 @@
449
562
  equal(main, 1, "Verify that the trigger happened correctly.");
450
563
  jQuery("#qunit-fixture").unbind("click");
451
564
  });
452
- test("live(name, false), die(name, false)", function() {
565
+ test("live(name, false), die(name, false)", function () {
453
566
  expect(3);
454
567
  var main = 0;
455
- jQuery("#qunit-fixture").live("click", function(e) {
568
+ jQuery("#qunit-fixture").live("click", function (e) {
456
569
  main++;
457
570
  });
458
571
  jQuery("#ap").trigger("click");
@@ -467,10 +580,10 @@
467
580
  equal(main, 1, "Verify that the trigger happened correctly.");
468
581
  jQuery("#qunit-fixture").die("click");
469
582
  });
470
- test("delegate(selector, name, false), undelegate(selector, name, false)", function() {
583
+ test("delegate(selector, name, false), undelegate(selector, name, false)", function () {
471
584
  expect(3);
472
585
  var main = 0;
473
- jQuery("#qunit-fixture").delegate("#ap", "click", function(e) {
586
+ jQuery("#qunit-fixture").delegate("#ap", "click", function (e) {
474
587
  main++;
475
588
  });
476
589
  jQuery("#ap").trigger("click");
@@ -485,74 +598,115 @@
485
598
  equal(main, 1, "Verify that the trigger happened correctly.");
486
599
  jQuery("#qunit-fixture").undelegate("#ap", "click");
487
600
  });
488
- test("bind()/trigger()/unbind() on plain object", function() {
601
+ test("bind()/trigger()/unbind() on plain object", function () {
489
602
  expect(7);
490
603
  var obj = {};
491
604
  jQuery(obj).trigger("test");
492
605
  jQuery(obj).unbind("test");
493
606
  jQuery(obj).bind({
494
- "test": function() {
607
+ test: function () {
495
608
  ok(true, "Custom event run.");
496
609
  },
497
- "submit": function() {
610
+ submit: function () {
498
611
  ok(true, "Custom submit event run.");
499
- }
612
+ },
500
613
  });
501
614
  var events = jQuery._data(obj, "events");
502
615
  ok(events, "Object has events bound.");
503
- equal(obj["events"], undefined, "Events object on plain objects is not events");
504
- equal(obj["test"], undefined, "Make sure that test event is not on the plain object.");
505
- equal(obj["handle"], undefined, "Make sure that the event handler is not on the plain object.");
616
+ equal(
617
+ obj["events"],
618
+ undefined,
619
+ "Events object on plain objects is not events"
620
+ );
621
+ equal(
622
+ obj["test"],
623
+ undefined,
624
+ "Make sure that test event is not on the plain object."
625
+ );
626
+ equal(
627
+ obj["handle"],
628
+ undefined,
629
+ "Make sure that the event handler is not on the plain object."
630
+ );
506
631
  jQuery(obj).trigger("test");
507
632
  jQuery(obj).trigger("submit");
508
633
  jQuery(obj).unbind("test");
509
634
  jQuery(obj).unbind("submit");
510
635
  jQuery(obj).trigger("test");
511
636
  jQuery(obj).unbind("test");
512
- equal(obj && obj[jQuery.expando] && obj[jQuery.expando][jQuery.expando] && obj[jQuery.expando][jQuery.expando]["events"], undefined, "Make sure events object is removed");
513
- });
514
- test("unbind(type)", function() {
637
+ equal(
638
+ obj &&
639
+ obj[jQuery.expando] &&
640
+ obj[jQuery.expando][jQuery.expando] &&
641
+ obj[jQuery.expando][jQuery.expando]["events"],
642
+ undefined,
643
+ "Make sure events object is removed"
644
+ );
645
+ });
646
+ test("unbind(type)", function () {
515
647
  expect(1);
516
648
  var $elem = jQuery("#firstp"),
517
- message;
649
+ message;
518
650
  function error() {
519
651
  ok(false, message);
520
652
  }
521
653
  message = "unbind passing function";
522
- $elem.bind("error1", error).unbind("error1", error).triggerHandler("error1");
654
+ $elem
655
+ .bind("error1", error)
656
+ .unbind("error1", error)
657
+ .triggerHandler("error1");
523
658
  message = "unbind all from event";
524
659
  $elem.bind("error1", error).unbind("error1").triggerHandler("error1");
525
660
  message = "unbind all";
526
661
  $elem.bind("error1", error).unbind().triggerHandler("error1");
527
662
  message = "unbind many with function";
528
- $elem.bind("error1 error2", error).unbind("error1 error2", error).trigger("error1").triggerHandler("error2");
663
+ $elem
664
+ .bind("error1 error2", error)
665
+ .unbind("error1 error2", error)
666
+ .trigger("error1")
667
+ .triggerHandler("error2");
529
668
  message = "unbind many";
530
- $elem.bind("error1 error2", error).unbind("error1 error2").trigger("error1").triggerHandler("error2");
669
+ $elem
670
+ .bind("error1 error2", error)
671
+ .unbind("error1 error2")
672
+ .trigger("error1")
673
+ .triggerHandler("error2");
531
674
  message = "unbind without a type or handler";
532
- $elem.bind("error1 error2.test", error).unbind().trigger("error1").triggerHandler("error2");
533
- jQuery(document).bind("click", function() {
675
+ $elem
676
+ .bind("error1 error2.test", error)
677
+ .unbind()
678
+ .trigger("error1")
679
+ .triggerHandler("error2");
680
+ jQuery(document).bind("click", function () {
534
681
  ok(true, "called handler after selective removal");
535
682
  });
536
- var func = function() {};
537
- jQuery(document).bind("click", func).unbind("click", func).click().unbind("click");
683
+ var func = function () {};
684
+ jQuery(document)
685
+ .bind("click", func)
686
+ .unbind("click", func)
687
+ .click()
688
+ .unbind("click");
538
689
  });
539
- test("unbind(eventObject)", function() {
690
+ test("unbind(eventObject)", function () {
540
691
  expect(4);
541
692
  var $elem = jQuery("#firstp"),
542
- num;
693
+ num;
543
694
  function assert(expected) {
544
695
  num = 0;
545
696
  $elem.trigger("foo").triggerHandler("bar");
546
697
  equal(num, expected, "Check the right handlers are triggered");
547
698
  }
548
- $elem.bind("foo", function() {
549
- num += 1;
550
- }).bind("foo", function(e) {
551
- $elem.unbind(e);
552
- num += 2;
553
- }).bind("bar", function() {
554
- num += 4;
555
- });
699
+ $elem
700
+ .bind("foo", function () {
701
+ num += 1;
702
+ })
703
+ .bind("foo", function (e) {
704
+ $elem.unbind(e);
705
+ num += 2;
706
+ })
707
+ .bind("bar", function () {
708
+ num += 4;
709
+ });
556
710
  assert(7);
557
711
  assert(5);
558
712
  $elem.unbind("bar");
@@ -560,57 +714,84 @@
560
714
  $elem.unbind();
561
715
  assert(0);
562
716
  });
563
- test("hover() and hover pseudo-event", function() {
717
+ test("hover() and hover pseudo-event", function () {
564
718
  expect(3);
565
719
  var times = 0,
566
- handler1 = function(event) {
567
- ++times;
568
- },
569
- handler2 = function(event) {
570
- ++times;
571
- };
572
- jQuery("#firstp").hover(handler1, handler2).mouseenter().mouseleave().unbind("mouseenter", handler1).unbind("mouseleave", handler2).hover(handler1).mouseenter().mouseleave().unbind("mouseenter mouseleave", handler1).mouseenter().mouseleave();
720
+ handler1 = function (event) {
721
+ ++times;
722
+ },
723
+ handler2 = function (event) {
724
+ ++times;
725
+ };
726
+ jQuery("#firstp")
727
+ .hover(handler1, handler2)
728
+ .mouseenter()
729
+ .mouseleave()
730
+ .unbind("mouseenter", handler1)
731
+ .unbind("mouseleave", handler2)
732
+ .hover(handler1)
733
+ .mouseenter()
734
+ .mouseleave()
735
+ .unbind("mouseenter mouseleave", handler1)
736
+ .mouseenter()
737
+ .mouseleave();
573
738
  equal(times, 4, "hover handlers fired");
574
739
  var balance = 0;
575
- jQuery("#firstp").on("hovercraft", function() {
576
- ok(false, "hovercraft is full of ills");
577
- }).on("click.hover.me.not", function(e) {
578
- equal(e.handleObj.namespace, "hover.me.not", "hover hack doesn't mangle namespaces");
579
- }).bind("hover", function(e) {
580
- if (e.type === "mouseenter") {
581
- balance++;
582
- } else if (e.type === "mouseleave") {
583
- balance--;
584
- } else {
585
- ok(false, "hover pseudo: unknown event type " + e.type);
586
- }
587
- }).trigger("click").trigger("mouseenter").trigger("mouseleave").unbind("hover").trigger("mouseenter");
740
+ jQuery("#firstp")
741
+ .on("hovercraft", function () {
742
+ ok(false, "hovercraft is full of ills");
743
+ })
744
+ .on("click.hover.me.not", function (e) {
745
+ equal(
746
+ e.handleObj.namespace,
747
+ "hover.me.not",
748
+ "hover hack doesn't mangle namespaces"
749
+ );
750
+ })
751
+ .bind("hover", function (e) {
752
+ if (e.type === "mouseenter") {
753
+ balance++;
754
+ } else if (e.type === "mouseleave") {
755
+ balance--;
756
+ } else {
757
+ ok(false, "hover pseudo: unknown event type " + e.type);
758
+ }
759
+ })
760
+ .trigger("click")
761
+ .trigger("mouseenter")
762
+ .trigger("mouseleave")
763
+ .unbind("hover")
764
+ .trigger("mouseenter");
588
765
  equal(balance, 0, "hover pseudo-event");
589
766
  });
590
- test("mouseover triggers mouseenter", function() {
767
+ test("mouseover triggers mouseenter", function () {
591
768
  expect(1);
592
769
  var count = 0,
593
- elem = jQuery("<a />");
594
- elem.mouseenter(function() {
770
+ elem = jQuery("<a />");
771
+ elem.mouseenter(function () {
595
772
  count++;
596
773
  });
597
774
  elem.trigger("mouseover");
598
775
  equal(count, 1, "make sure mouseover triggers a mouseenter");
599
776
  elem.remove();
600
777
  });
601
- test("withinElement implemented with jQuery.contains()", function() {
778
+ test("withinElement implemented with jQuery.contains()", function () {
602
779
  expect(1);
603
- jQuery("#qunit-fixture").append('<div id="jc-outer"><div id="jc-inner"></div></div>');
604
- jQuery("#jc-outer").bind("mouseenter mouseleave", function(event) {
605
- equal(this.id, "jc-outer", this.id + " " + event.type);
606
- }).trigger("mouseenter");
780
+ jQuery("#qunit-fixture").append(
781
+ '<div id="jc-outer"><div id="jc-inner"></div></div>'
782
+ );
783
+ jQuery("#jc-outer")
784
+ .bind("mouseenter mouseleave", function (event) {
785
+ equal(this.id, "jc-outer", this.id + " " + event.type);
786
+ })
787
+ .trigger("mouseenter");
607
788
  jQuery("#jc-inner").trigger("mousenter");
608
789
  jQuery("#jc-outer").unbind("mouseenter mouseleave").remove();
609
790
  jQuery("#jc-inner").remove();
610
791
  });
611
- test("mouseenter, mouseleave don't catch exceptions", function() {
792
+ test("mouseenter, mouseleave don't catch exceptions", function () {
612
793
  expect(2);
613
- var elem = jQuery("#firstp").hover(function() {
794
+ var elem = jQuery("#firstp").hover(function () {
614
795
  throw "an Exception";
615
796
  });
616
797
  try {
@@ -624,65 +805,89 @@
624
805
  equal(e, "an Exception", "mouseleave doesn't catch exceptions");
625
806
  }
626
807
  });
627
- test("trigger() shortcuts", function() {
808
+ test("trigger() shortcuts", function () {
628
809
  expect(6);
629
- var elem = jQuery("<li><a href='#'>Change location</a></li>").prependTo("#firstUL");
630
- elem.find("a").bind("click", function() {
631
- var close = jQuery("spanx", this);
632
- equal(close.length, 0, "Context element does not exist, length must be zero");
633
- ok(!close[0], "Context element does not exist, direct access to element must return undefined");
634
- return false;
635
- }).click();
810
+ var elem = jQuery("<li><a href='#'>Change location</a></li>").prependTo(
811
+ "#firstUL"
812
+ );
813
+ elem
814
+ .find("a")
815
+ .bind("click", function () {
816
+ var close = jQuery("spanx", this);
817
+ equal(
818
+ close.length,
819
+ 0,
820
+ "Context element does not exist, length must be zero"
821
+ );
822
+ ok(
823
+ !close[0],
824
+ "Context element does not exist, direct access to element must return undefined"
825
+ );
826
+ return false;
827
+ })
828
+ .click();
636
829
  elem.remove();
637
- jQuery("#check1").click(function() {
638
- ok(true, "click event handler for checkbox gets fired twice, see #815");
639
- }).click();
830
+ jQuery("#check1")
831
+ .click(function () {
832
+ ok(true, "click event handler for checkbox gets fired twice, see #815");
833
+ })
834
+ .click();
640
835
  var counter = 0;
641
- jQuery("#firstp")[0].onclick = function(event) {
836
+ jQuery("#firstp")[0].onclick = function (event) {
642
837
  counter++;
643
838
  };
644
839
  jQuery("#firstp").click();
645
840
  equal(counter, 1, "Check that click, triggers onclick event handler also");
646
841
  var clickCounter = 0;
647
- jQuery("#simon1")[0].onclick = function(event) {
842
+ jQuery("#simon1")[0].onclick = function (event) {
648
843
  clickCounter++;
649
844
  };
650
845
  jQuery("#simon1").click();
651
- equal(clickCounter, 1, "Check that click, triggers onclick event handler on an a tag also");
652
- elem = jQuery("<img />").load(function() {
653
- ok(true, "Trigger the load event, using the shortcut .load() (#2819)");
654
- }).load();
846
+ equal(
847
+ clickCounter,
848
+ 1,
849
+ "Check that click, triggers onclick event handler on an a tag also"
850
+ );
851
+ elem = jQuery("<img />")
852
+ .load(function () {
853
+ ok(true, "Trigger the load event, using the shortcut .load() (#2819)");
854
+ })
855
+ .load();
655
856
  elem.remove();
656
- jQuery('<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />').appendTo('head');
657
- jQuery('<v:oval id="oval" style="width:100pt;height:75pt;" fillcolor="red"> </v:oval>').appendTo('#form');
857
+ jQuery(
858
+ '<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />'
859
+ ).appendTo("head");
860
+ jQuery(
861
+ '<v:oval id="oval" style="width:100pt;height:75pt;" fillcolor="red"> </v:oval>'
862
+ ).appendTo("#form");
658
863
  jQuery("#oval").click().keydown();
659
864
  });
660
- test("trigger() bubbling", function() {
865
+ test("trigger() bubbling", function () {
661
866
  expect(18);
662
867
  var win = 0,
663
- doc = 0,
664
- html = 0,
665
- body = 0,
666
- main = 0,
667
- ap = 0;
668
- jQuery(window).bind("click", function(e) {
868
+ doc = 0,
869
+ html = 0,
870
+ body = 0,
871
+ main = 0,
872
+ ap = 0;
873
+ jQuery(window).bind("click", function (e) {
669
874
  win++;
670
875
  });
671
- jQuery(document).bind("click", function(e) {
876
+ jQuery(document).bind("click", function (e) {
672
877
  if (e.target !== document) {
673
878
  doc++;
674
879
  }
675
880
  });
676
- jQuery("html").bind("click", function(e) {
881
+ jQuery("html").bind("click", function (e) {
677
882
  html++;
678
883
  });
679
- jQuery("body").bind("click", function(e) {
884
+ jQuery("body").bind("click", function (e) {
680
885
  body++;
681
886
  });
682
- jQuery("#qunit-fixture").bind("click", function(e) {
887
+ jQuery("#qunit-fixture").bind("click", function (e) {
683
888
  main++;
684
889
  });
685
- jQuery("#ap").bind("click", function() {
890
+ jQuery("#ap").bind("click", function () {
686
891
  ap++;
687
892
  return false;
688
893
  });
@@ -712,9 +917,9 @@
712
917
  jQuery(document).unbind("click");
713
918
  jQuery("html, body, #qunit-fixture").unbind("click");
714
919
  });
715
- test("trigger(type, [data], [fn])", function() {
920
+ test("trigger(type, [data], [fn])", function () {
716
921
  expect(16);
717
- var handler = function(event, a, b, c) {
922
+ var handler = function (event, a, b, c) {
718
923
  equal(event.type, "click", "check passed data");
719
924
  equal(a, 1, "check passed data");
720
925
  equal(b, "2", "check passed data");
@@ -722,26 +927,30 @@
722
927
  return "test";
723
928
  };
724
929
  var $elem = jQuery("#firstp");
725
- $elem[0].click = function() {
930
+ $elem[0].click = function () {
726
931
  ok(true, "Native call was triggered");
727
932
  };
728
- $elem.live('mouseenter', function() {
729
- ok(true, 'Trigger mouseenter bound by live');
933
+ $elem.live("mouseenter", function () {
934
+ ok(true, "Trigger mouseenter bound by live");
730
935
  });
731
- $elem.live('mouseleave', function() {
732
- ok(true, 'Trigger mouseleave bound by live');
936
+ $elem.live("mouseleave", function () {
937
+ ok(true, "Trigger mouseleave bound by live");
733
938
  });
734
- $elem.trigger('mouseenter');
735
- $elem.trigger('mouseleave');
736
- $elem.die('mouseenter');
737
- $elem.die('mouseleave');
939
+ $elem.trigger("mouseenter");
940
+ $elem.trigger("mouseleave");
941
+ $elem.die("mouseenter");
942
+ $elem.die("mouseleave");
738
943
  $elem.bind("click", handler).trigger("click", [1, "2", "abc"]);
739
- $elem[0].click = function() {
944
+ $elem[0].click = function () {
740
945
  ok(false, "Native call was triggered");
741
946
  };
742
- equal($elem.triggerHandler("click", [1, "2", "abc"]), "test", "Verify handler response");
947
+ equal(
948
+ $elem.triggerHandler("click", [1, "2", "abc"]),
949
+ "test",
950
+ "Verify handler response"
951
+ );
743
952
  var pass = true,
744
- elem2;
953
+ elem2;
745
954
  try {
746
955
  elem2 = jQuery("#form input:first");
747
956
  elem2.get(0).style.display = "none";
@@ -752,19 +961,21 @@
752
961
  ok(pass, "Trigger focus on hidden element");
753
962
  pass = true;
754
963
  try {
755
- jQuery("#qunit-fixture table:first").bind("test:test", function() {}).trigger("test:test");
964
+ jQuery("#qunit-fixture table:first")
965
+ .bind("test:test", function () {})
966
+ .trigger("test:test");
756
967
  } catch (e) {
757
968
  pass = false;
758
969
  }
759
970
  ok(pass, "Trigger on a table with a colon in the even type, see #3533");
760
971
  var form = jQuery("<form action=''></form>").appendTo("body");
761
- form.submit(function() {
972
+ form.submit(function () {
762
973
  ok(true, "Local bind still works.");
763
974
  return false;
764
975
  });
765
976
  form.trigger("submit");
766
977
  form.unbind("submit");
767
- jQuery(document).submit(function() {
978
+ jQuery(document).submit(function () {
768
979
  ok(true, "Make sure bubble works up to document.");
769
980
  return false;
770
981
  });
@@ -772,12 +983,12 @@
772
983
  jQuery(document).unbind("submit");
773
984
  form.remove();
774
985
  });
775
- test("submit event bubbles on copied forms (#11649)", function() {
986
+ test("submit event bubbles on copied forms (#11649)", function () {
776
987
  var $formByClone,
777
- $formByHTML,
778
- $testForm = jQuery("#testForm"),
779
- $fixture = jQuery("#qunit-fixture"),
780
- $wrapperDiv = jQuery("<div/>").appendTo($fixture);
988
+ $formByHTML,
989
+ $testForm = jQuery("#testForm"),
990
+ $fixture = jQuery("#qunit-fixture"),
991
+ $wrapperDiv = jQuery("<div/>").appendTo($fixture);
781
992
  function noSubmit(e) {
782
993
  e.preventDefault();
783
994
  }
@@ -790,18 +1001,22 @@
790
1001
  $formByClone = $testForm.clone(true, true).removeAttr("id");
791
1002
  $formByHTML = jQuery($fixture.html()).filter("#testForm").removeAttr("id");
792
1003
  $wrapperDiv.append($formByClone, $formByHTML);
793
- $wrapperDiv.find("form").on("submit", noSubmit).find("input[name=sub1]").click();
1004
+ $wrapperDiv
1005
+ .find("form")
1006
+ .on("submit", noSubmit)
1007
+ .find("input[name=sub1]")
1008
+ .click();
794
1009
  $wrapperDiv.remove();
795
1010
  $fixture.off("submit", "form", delegatedSubmit);
796
1011
  $testForm.off("submit", noSubmit);
797
1012
  });
798
- test("change event bubbles on copied forms (#11796)", function() {
1013
+ test("change event bubbles on copied forms (#11796)", function () {
799
1014
  expect(3);
800
1015
  var $formByClone,
801
- $formByHTML,
802
- $form = jQuery("#form"),
803
- $fixture = jQuery("#qunit-fixture"),
804
- $wrapperDiv = jQuery("<div/>").appendTo($fixture);
1016
+ $formByHTML,
1017
+ $form = jQuery("#form"),
1018
+ $fixture = jQuery("#qunit-fixture"),
1019
+ $wrapperDiv = jQuery("<div/>").appendTo($fixture);
805
1020
  function delegatedChange() {
806
1021
  ok(true, "Make sure change event bubbles up.");
807
1022
  return false;
@@ -815,53 +1030,81 @@
815
1030
  $wrapperDiv.remove();
816
1031
  $fixture.off("change", "form", delegatedChange);
817
1032
  });
818
- test("trigger(eventObject, [data], [fn])", function() {
1033
+ test("trigger(eventObject, [data], [fn])", function () {
819
1034
  expect(28);
820
1035
  var $parent = jQuery("<div id='par' />").appendTo("body"),
821
- $child = jQuery("<p id='child'>foo</p>").appendTo($parent);
1036
+ $child = jQuery("<p id='child'>foo</p>").appendTo($parent);
822
1037
  $parent.get(0).style.display = "none";
823
1038
  var event = jQuery.Event("noNew");
824
1039
  ok(event != window, "Instantiate jQuery.Event without the 'new' keyword");
825
1040
  equal(event.type, "noNew", "Verify its type");
826
1041
  equal(event.isDefaultPrevented(), false, "Verify isDefaultPrevented");
827
1042
  equal(event.isPropagationStopped(), false, "Verify isPropagationStopped");
828
- equal(event.isImmediatePropagationStopped(), false, "Verify isImmediatePropagationStopped");
1043
+ equal(
1044
+ event.isImmediatePropagationStopped(),
1045
+ false,
1046
+ "Verify isImmediatePropagationStopped"
1047
+ );
829
1048
  event.preventDefault();
830
1049
  equal(event.isDefaultPrevented(), true, "Verify isDefaultPrevented");
831
1050
  event.stopPropagation();
832
1051
  equal(event.isPropagationStopped(), true, "Verify isPropagationStopped");
833
- event.isPropagationStopped = function() {
1052
+ event.isPropagationStopped = function () {
834
1053
  return false;
835
1054
  };
836
1055
  event.stopImmediatePropagation();
837
1056
  equal(event.isPropagationStopped(), true, "Verify isPropagationStopped");
838
- equal(event.isImmediatePropagationStopped(), true, "Verify isPropagationStopped");
839
- $parent.bind("foo", function(e) {
840
- equal(e.type, "foo", "Verify event type when passed passing an event object");
841
- equal(e.target.id, "child", "Verify event.target when passed passing an event object");
842
- equal(e.currentTarget.id, "par", "Verify event.currentTarget when passed passing an event object");
843
- equal(e.secret, "boo!", "Verify event object's custom attribute when passed passing an event object");
1057
+ equal(
1058
+ event.isImmediatePropagationStopped(),
1059
+ true,
1060
+ "Verify isPropagationStopped"
1061
+ );
1062
+ $parent.bind("foo", function (e) {
1063
+ equal(
1064
+ e.type,
1065
+ "foo",
1066
+ "Verify event type when passed passing an event object"
1067
+ );
1068
+ equal(
1069
+ e.target.id,
1070
+ "child",
1071
+ "Verify event.target when passed passing an event object"
1072
+ );
1073
+ equal(
1074
+ e.currentTarget.id,
1075
+ "par",
1076
+ "Verify event.currentTarget when passed passing an event object"
1077
+ );
1078
+ equal(
1079
+ e.secret,
1080
+ "boo!",
1081
+ "Verify event object's custom attribute when passed passing an event object"
1082
+ );
844
1083
  });
845
1084
  event = new jQuery.Event("foo");
846
1085
  event.secret = "boo!";
847
1086
  $child.trigger(event);
848
1087
  $child.trigger({
849
- "type": "foo",
850
- "secret": "boo!"
1088
+ type: "foo",
1089
+ secret: "boo!",
851
1090
  });
852
1091
  $parent.unbind();
853
1092
  function error() {
854
1093
  ok(false, "This assertion shouldn't be reached");
855
1094
  }
856
1095
  $parent.bind("foo", error);
857
- $child.bind("foo", function(e, a, b, c) {
1096
+ $child.bind("foo", function (e, a, b, c) {
858
1097
  equal(arguments.length, 4, "Check arguments length");
859
1098
  equal(a, 1, "Check first custom argument");
860
1099
  equal(b, 2, "Check second custom argument");
861
1100
  equal(c, 3, "Check third custom argument");
862
1101
  equal(e.isDefaultPrevented(), false, "Verify isDefaultPrevented");
863
1102
  equal(e.isPropagationStopped(), false, "Verify isPropagationStopped");
864
- equal(e.isImmediatePropagationStopped(), false, "Verify isImmediatePropagationStopped");
1103
+ equal(
1104
+ e.isImmediatePropagationStopped(),
1105
+ false,
1106
+ "Verify isImmediatePropagationStopped"
1107
+ );
865
1108
  e.stopImmediatePropagation();
866
1109
  return "result";
867
1110
  });
@@ -877,140 +1120,261 @@
877
1120
  equal(event.isPropagationStopped(), false, "propagation not stopped");
878
1121
  equal(event.isDefaultPrevented(), false, "default not prevented");
879
1122
  });
880
- test(".trigger() bubbling on disconnected elements (#10489)", function() {
1123
+ test(".trigger() bubbling on disconnected elements (#10489)", function () {
881
1124
  expect(2);
882
- jQuery(window).on("click", function() {
1125
+ jQuery(window).on("click", function () {
883
1126
  ok(false, "click fired on window");
884
1127
  });
885
- jQuery("<div><p>hi</p></div>").on("click", function() {
886
- ok(true, "click fired on div");
887
- }).find("p").on("click", function() {
888
- ok(true, "click fired on p");
889
- }).click().off("click").end().off("click").remove();
1128
+ jQuery("<div><p>hi</p></div>")
1129
+ .on("click", function () {
1130
+ ok(true, "click fired on div");
1131
+ })
1132
+ .find("p")
1133
+ .on("click", function () {
1134
+ ok(true, "click fired on p");
1135
+ })
1136
+ .click()
1137
+ .off("click")
1138
+ .end()
1139
+ .off("click")
1140
+ .remove();
890
1141
  jQuery(window).off("click");
891
1142
  });
892
- test(".trigger() doesn't bubble load event (#10717)", function() {
1143
+ test(".trigger() doesn't bubble load event (#10717)", function () {
893
1144
  expect(1);
894
- jQuery(window).on("load", function() {
1145
+ jQuery(window).on("load", function () {
895
1146
  ok(false, "load fired on window");
896
1147
  });
897
- jQuery('<img src="index.html" />').appendTo("body").on("load", function() {
898
- ok(true, "load fired on img");
899
- }).trigger("load").remove();
1148
+ jQuery('<img src="index.html" />')
1149
+ .appendTo("body")
1150
+ .on("load", function () {
1151
+ ok(true, "load fired on img");
1152
+ })
1153
+ .trigger("load")
1154
+ .remove();
900
1155
  jQuery(window).off("load");
901
1156
  });
902
- test("Delegated events in SVG (#10791)", function() {
1157
+ test("Delegated events in SVG (#10791)", function () {
903
1158
  expect(2);
904
- var svg = jQuery('<svg height="1" version="1.1" width="1" xmlns="http://www.w3.org/2000/svg">' + '<rect class="svg-by-class" x="10" y="20" width="100" height="60" r="10" rx="10" ry="10"></rect>' + '<rect id="svg-by-id" x="10" y="20" width="100" height="60" r="10" rx="10" ry="10"></rect>' + '</svg>').appendTo("body");
905
- jQuery("body").on("click", "#svg-by-id", function() {
906
- ok(true, "delegated id selector");
907
- }).on("click", "[class~='svg-by-class']", function() {
908
- ok(true, "delegated class selector");
909
- }).find("#svg-by-id, [class~='svg-by-class']").trigger("click").end().off("click");
1159
+ var svg = jQuery(
1160
+ '<svg height="1" version="1.1" width="1" xmlns="http://www.w3.org/2000/svg">' +
1161
+ '<rect class="svg-by-class" x="10" y="20" width="100" height="60" r="10" rx="10" ry="10"></rect>' +
1162
+ '<rect id="svg-by-id" x="10" y="20" width="100" height="60" r="10" rx="10" ry="10"></rect>' +
1163
+ "</svg>"
1164
+ ).appendTo("body");
1165
+ jQuery("body")
1166
+ .on("click", "#svg-by-id", function () {
1167
+ ok(true, "delegated id selector");
1168
+ })
1169
+ .on("click", "[class~='svg-by-class']", function () {
1170
+ ok(true, "delegated class selector");
1171
+ })
1172
+ .find("#svg-by-id, [class~='svg-by-class']")
1173
+ .trigger("click")
1174
+ .end()
1175
+ .off("click");
910
1176
  svg.remove();
911
1177
  });
912
- test("Delegated events in forms (#10844; #11145; #8165; #11382, #11764)", function() {
1178
+ test("Delegated events in forms (#10844; #11145; #8165; #11382, #11764)", function () {
913
1179
  expect(5);
914
- var form = jQuery('<form id="myform">' + '<input type="text" name="id" value="secret agent man" />' + '</form>').on("submit", function(event) {
915
- event.preventDefault();
916
- }).appendTo("body");
917
- jQuery("body").on("submit", "#myform", function() {
918
- ok(true, "delegated id selector with aliased id");
919
- }).find("#myform").trigger("submit").end().off("submit");
920
- form.append('<input type="text" name="disabled" value="differently abled" />');
921
- jQuery("body").on("submit", "#myform", function() {
922
- ok(true, "delegated id selector with aliased disabled");
923
- }).find("#myform").trigger("submit").end().off("submit");
924
- form.append('<button id="nestyDisabledBtn"><span>Zing</span></button>').on("click", "#nestyDisabledBtn", function() {
925
- ok(true, "click on enabled/disabled button with nesty elements");
926
- }).on("mouseover", "#nestyDisabledBtn", function() {
927
- ok(true, "mouse on enabled/disabled button with nesty elements");
928
- }).find("span").trigger("click").trigger("mouseover").end().find("#nestyDisabledBtn").prop("disabled", true).end().find("span").trigger("click").trigger("mouseover").end().off("click");
1180
+ var form = jQuery(
1181
+ '<form id="myform">' +
1182
+ '<input type="text" name="id" value="secret agent man" />' +
1183
+ "</form>"
1184
+ )
1185
+ .on("submit", function (event) {
1186
+ event.preventDefault();
1187
+ })
1188
+ .appendTo("body");
1189
+ jQuery("body")
1190
+ .on("submit", "#myform", function () {
1191
+ ok(true, "delegated id selector with aliased id");
1192
+ })
1193
+ .find("#myform")
1194
+ .trigger("submit")
1195
+ .end()
1196
+ .off("submit");
1197
+ form.append(
1198
+ '<input type="text" name="disabled" value="differently abled" />'
1199
+ );
1200
+ jQuery("body")
1201
+ .on("submit", "#myform", function () {
1202
+ ok(true, "delegated id selector with aliased disabled");
1203
+ })
1204
+ .find("#myform")
1205
+ .trigger("submit")
1206
+ .end()
1207
+ .off("submit");
1208
+ form
1209
+ .append('<button id="nestyDisabledBtn"><span>Zing</span></button>')
1210
+ .on("click", "#nestyDisabledBtn", function () {
1211
+ ok(true, "click on enabled/disabled button with nesty elements");
1212
+ })
1213
+ .on("mouseover", "#nestyDisabledBtn", function () {
1214
+ ok(true, "mouse on enabled/disabled button with nesty elements");
1215
+ })
1216
+ .find("span")
1217
+ .trigger("click")
1218
+ .trigger("mouseover")
1219
+ .end()
1220
+ .find("#nestyDisabledBtn")
1221
+ .prop("disabled", true)
1222
+ .end()
1223
+ .find("span")
1224
+ .trigger("click")
1225
+ .trigger("mouseover")
1226
+ .end()
1227
+ .off("click");
929
1228
  form.remove();
930
1229
  });
931
- test("Submit event can be stopped (#11049)", function() {
1230
+ test("Submit event can be stopped (#11049)", function () {
932
1231
  expect(1);
933
- var form = jQuery('<form id="myform">' + '<input type="text" name="sue" value="bawls" />' + '<input type="submit" />' + '</form>').appendTo("body");
934
- jQuery("body").on("submit", function() {
935
- ok(true, "submit bubbled on first handler");
936
- return false;
937
- }).find("#myform input[type=submit]").each(function() {
938
- this.click();
939
- }).end().on("submit", function() {
940
- ok(false, "submit bubbled on second handler");
941
- return false;
942
- }).find("#myform input[type=submit]").each(function() {
943
- jQuery(this.form).on("submit", function(e) {
944
- e.preventDefault();
945
- e.stopPropagation();
946
- });
947
- this.click();
948
- }).end().off("submit");
1232
+ var form = jQuery(
1233
+ '<form id="myform">' +
1234
+ '<input type="text" name="sue" value="bawls" />' +
1235
+ '<input type="submit" />' +
1236
+ "</form>"
1237
+ ).appendTo("body");
1238
+ jQuery("body")
1239
+ .on("submit", function () {
1240
+ ok(true, "submit bubbled on first handler");
1241
+ return false;
1242
+ })
1243
+ .find("#myform input[type=submit]")
1244
+ .each(function () {
1245
+ this.click();
1246
+ })
1247
+ .end()
1248
+ .on("submit", function () {
1249
+ ok(false, "submit bubbled on second handler");
1250
+ return false;
1251
+ })
1252
+ .find("#myform input[type=submit]")
1253
+ .each(function () {
1254
+ jQuery(this.form).on("submit", function (e) {
1255
+ e.preventDefault();
1256
+ e.stopPropagation();
1257
+ });
1258
+ this.click();
1259
+ })
1260
+ .end()
1261
+ .off("submit");
949
1262
  form.remove();
950
1263
  });
951
- test("on(beforeunload) creates/deletes window property instead of adding/removing event listener", function() {
952
- var handle = function() {};
1264
+ test("on(beforeunload) creates/deletes window property instead of adding/removing event listener", function () {
1265
+ var handle = function () {};
953
1266
  jQuery(window).on("beforeunload", handle);
954
- equal(typeof window.onbeforeunload, "function", "window property is set to a function");
1267
+ equal(
1268
+ typeof window.onbeforeunload,
1269
+ "function",
1270
+ "window property is set to a function"
1271
+ );
955
1272
  jQuery(window).off("beforeunload", handle);
956
1273
  });
957
- test("jQuery.Event( type, props )", function() {
1274
+ test("jQuery.Event( type, props )", function () {
958
1275
  expect(5);
959
- var event = jQuery.Event("keydown", {keyCode: 64}),
960
- handler = function(event) {
961
- ok("keyCode" in event, "Special property 'keyCode' exists");
962
- equal(event.keyCode, 64, "event.keyCode has explicit value '64'");
963
- };
1276
+ var event = jQuery.Event("keydown", { keyCode: 64 }),
1277
+ handler = function (event) {
1278
+ ok("keyCode" in event, "Special property 'keyCode' exists");
1279
+ equal(event.keyCode, 64, "event.keyCode has explicit value '64'");
1280
+ };
964
1281
  equal(event.type, "keydown", "Verify type");
965
- equal(jQuery.inArray("type", jQuery.event.props), -1, "'type' property not in props (#10375)");
1282
+ equal(
1283
+ jQuery.inArray("type", jQuery.event.props),
1284
+ -1,
1285
+ "'type' property not in props (#10375)"
1286
+ );
966
1287
  ok("keyCode" in event, "Special 'keyCode' property exists");
967
1288
  jQuery("body").bind("keydown", handler).trigger(event);
968
1289
  jQuery("body").unbind("keydown");
969
1290
  });
970
- test("jQuery.Event.currentTarget", function() {
1291
+ test("jQuery.Event.currentTarget", function () {
971
1292
  expect(2);
972
- jQuery("<div><p><button>shiny</button></p></div>").on("click", "p", function(e) {
973
- equal(e.currentTarget, this, "Check delegated currentTarget on event");
974
- }).find("button").on("click", function(e) {
975
- equal(e.currentTarget, this, "Check currentTarget on event");
976
- }).click().off("click").end().off("click");
977
- });
978
- test("toggle(Function, Function, ...)", function() {
1293
+ jQuery("<div><p><button>shiny</button></p></div>")
1294
+ .on("click", "p", function (e) {
1295
+ equal(e.currentTarget, this, "Check delegated currentTarget on event");
1296
+ })
1297
+ .find("button")
1298
+ .on("click", function (e) {
1299
+ equal(e.currentTarget, this, "Check currentTarget on event");
1300
+ })
1301
+ .click()
1302
+ .off("click")
1303
+ .end()
1304
+ .off("click");
1305
+ });
1306
+ test("toggle(Function, Function, ...)", function () {
979
1307
  expect(16);
980
1308
  var count = 0,
981
- fn1 = function(e) {
982
- count++;
983
- },
984
- fn2 = function(e) {
985
- count--;
986
- },
987
- preventDefault = function(e) {
988
- e.preventDefault();
989
- },
990
- link = jQuery("#mark");
991
- link.click(preventDefault).click().toggle(fn1, fn2).click().click().click().click().click();
1309
+ fn1 = function (e) {
1310
+ count++;
1311
+ },
1312
+ fn2 = function (e) {
1313
+ count--;
1314
+ },
1315
+ preventDefault = function (e) {
1316
+ e.preventDefault();
1317
+ },
1318
+ link = jQuery("#mark");
1319
+ link
1320
+ .click(preventDefault)
1321
+ .click()
1322
+ .toggle(fn1, fn2)
1323
+ .click()
1324
+ .click()
1325
+ .click()
1326
+ .click()
1327
+ .click();
992
1328
  equal(count, 1, "Check for toggle(fn, fn)");
993
- jQuery("#firstp").toggle(function() {
994
- equal(arguments.length, 4, "toggle correctly passes through additional triggered arguments, see #1701");
995
- }, function() {}).trigger("click", [1, 2, 3]);
1329
+ jQuery("#firstp")
1330
+ .toggle(
1331
+ function () {
1332
+ equal(
1333
+ arguments.length,
1334
+ 4,
1335
+ "toggle correctly passes through additional triggered arguments, see #1701"
1336
+ );
1337
+ },
1338
+ function () {}
1339
+ )
1340
+ .trigger("click", [1, 2, 3]);
996
1341
  var first = 0;
997
- jQuery("#simon1").one("click", function() {
998
- ok(true, "Execute event only once");
999
- jQuery(this).toggle(function() {
1000
- equal(first++, 0, "toggle(Function,Function) assigned from within one('xxx'), see #1054");
1001
- }, function() {
1002
- equal(first, 1, "toggle(Function,Function) assigned from within one('xxx'), see #1054");
1003
- });
1004
- return false;
1005
- }).click().click().click();
1342
+ jQuery("#simon1")
1343
+ .one("click", function () {
1344
+ ok(true, "Execute event only once");
1345
+ jQuery(this).toggle(
1346
+ function () {
1347
+ equal(
1348
+ first++,
1349
+ 0,
1350
+ "toggle(Function,Function) assigned from within one('xxx'), see #1054"
1351
+ );
1352
+ },
1353
+ function () {
1354
+ equal(
1355
+ first,
1356
+ 1,
1357
+ "toggle(Function,Function) assigned from within one('xxx'), see #1054"
1358
+ );
1359
+ }
1360
+ );
1361
+ return false;
1362
+ })
1363
+ .click()
1364
+ .click()
1365
+ .click();
1006
1366
  var turn = 0;
1007
- var fns = [function() {
1008
- turn = 1;
1009
- }, function() {
1010
- turn = 2;
1011
- }, function() {
1012
- turn = 3;
1013
- }];
1367
+ var fns = [
1368
+ function () {
1369
+ turn = 1;
1370
+ },
1371
+ function () {
1372
+ turn = 2;
1373
+ },
1374
+ function () {
1375
+ turn = 3;
1376
+ },
1377
+ ];
1014
1378
  var $div = jQuery("<div>&nbsp;</div>").toggle(fns[0], fns[1], fns[2]);
1015
1379
  $div.click();
1016
1380
  equal(turn, 1, "Trying toggle with 3 functions, attempt 1 yields 1");
@@ -1027,45 +1391,59 @@
1027
1391
  ok(!data, "Unbinding one function from toggle unbinds them all");
1028
1392
  $div.remove();
1029
1393
  var a = [],
1030
- b = [];
1394
+ b = [];
1031
1395
  $div = jQuery("<div/>");
1032
- $div.toggle(function() {
1033
- a.push(1);
1034
- }, function() {
1035
- a.push(2);
1036
- });
1396
+ $div.toggle(
1397
+ function () {
1398
+ a.push(1);
1399
+ },
1400
+ function () {
1401
+ a.push(2);
1402
+ }
1403
+ );
1037
1404
  $div.click();
1038
1405
  deepEqual(a, [1], "Check that a click worked.");
1039
- $div.toggle(function() {
1040
- b.push(1);
1041
- }, function() {
1042
- b.push(2);
1043
- });
1406
+ $div.toggle(
1407
+ function () {
1408
+ b.push(1);
1409
+ },
1410
+ function () {
1411
+ b.push(2);
1412
+ }
1413
+ );
1044
1414
  $div.click();
1045
1415
  deepEqual(a, [1, 2], "Check that a click worked with a second toggle.");
1046
1416
  deepEqual(b, [1], "Check that a click worked with a second toggle.");
1047
1417
  $div.click();
1048
- deepEqual(a, [1, 2, 1], "Check that a click worked with a second toggle, second click.");
1049
- deepEqual(b, [1, 2], "Check that a click worked with a second toggle, second click.");
1418
+ deepEqual(
1419
+ a,
1420
+ [1, 2, 1],
1421
+ "Check that a click worked with a second toggle, second click."
1422
+ );
1423
+ deepEqual(
1424
+ b,
1425
+ [1, 2],
1426
+ "Check that a click worked with a second toggle, second click."
1427
+ );
1050
1428
  $div.remove();
1051
1429
  });
1052
- test(".live()/.die()", function() {
1430
+ test(".live()/.die()", function () {
1053
1431
  expect(66);
1054
1432
  var submit = 0,
1055
- div = 0,
1056
- livea = 0,
1057
- liveb = 0;
1058
- jQuery("div").live("submit", function() {
1433
+ div = 0,
1434
+ livea = 0,
1435
+ liveb = 0;
1436
+ jQuery("div").live("submit", function () {
1059
1437
  submit++;
1060
1438
  return false;
1061
1439
  });
1062
- jQuery("div").live("click", function() {
1440
+ jQuery("div").live("click", function () {
1063
1441
  div++;
1064
1442
  });
1065
- jQuery("div#nothiddendiv").live("click", function() {
1443
+ jQuery("div#nothiddendiv").live("click", function () {
1066
1444
  livea++;
1067
1445
  });
1068
- jQuery("div#nothiddendivchild").live("click", function() {
1446
+ jQuery("div#nothiddendivchild").live("click", function () {
1069
1447
  liveb++;
1070
1448
  });
1071
1449
  jQuery("body").trigger("click");
@@ -1132,7 +1510,7 @@
1132
1510
  div = 0;
1133
1511
  livea = 0;
1134
1512
  liveb = 0;
1135
- jQuery("div#nothiddendivchild").live("click", function(e) {
1513
+ jQuery("div#nothiddendivchild").live("click", function (e) {
1136
1514
  liveb++;
1137
1515
  e.stopPropagation();
1138
1516
  });
@@ -1154,8 +1532,8 @@
1154
1532
  jQuery("div").die("click");
1155
1533
  jQuery("div").die("submit");
1156
1534
  var clicked = 0,
1157
- container = jQuery("#qunit-fixture")[0];
1158
- jQuery("#foo", container).live("click", function(e) {
1535
+ container = jQuery("#qunit-fixture")[0];
1536
+ jQuery("#foo", container).live("click", function (e) {
1159
1537
  clicked++;
1160
1538
  });
1161
1539
  jQuery("div").trigger("click");
@@ -1166,32 +1544,57 @@
1166
1544
  jQuery("#foo", container).die("click");
1167
1545
  jQuery("#foo").trigger("click");
1168
1546
  equal(clicked, 2, "die with a context");
1169
- jQuery("#foo").live("click", true, function(e) {
1547
+ jQuery("#foo").live("click", true, function (e) {
1170
1548
  equal(e.data, true, "live with event data");
1171
1549
  });
1172
1550
  jQuery("#foo").trigger("click").die("click");
1173
- jQuery("#foo").live("click", function(e, data) {
1551
+ jQuery("#foo").live("click", function (e, data) {
1174
1552
  equal(data, true, "live with trigger data");
1175
1553
  });
1176
1554
  jQuery("#foo").trigger("click", true).die("click");
1177
- jQuery("#foo").live("click", jQuery.proxy(function(e) {
1178
- equal(this.foo, "bar", "live with event scope");
1179
- }, {foo: "bar"}));
1555
+ jQuery("#foo").live(
1556
+ "click",
1557
+ jQuery.proxy(
1558
+ function (e) {
1559
+ equal(this.foo, "bar", "live with event scope");
1560
+ },
1561
+ { foo: "bar" }
1562
+ )
1563
+ );
1180
1564
  jQuery("#foo").trigger("click").die("click");
1181
- jQuery("#foo").live("click", true, jQuery.proxy(function(e, data) {
1182
- equal(e.data, true, "live with with different this object, event data, and trigger data");
1183
- equal(this["foo"], "bar", "live with with different this object, event data, and trigger data");
1184
- equal(data, true, "live with with different this object, event data, and trigger data");
1185
- }, {"foo": "bar"}));
1565
+ jQuery("#foo").live(
1566
+ "click",
1567
+ true,
1568
+ jQuery.proxy(
1569
+ function (e, data) {
1570
+ equal(
1571
+ e.data,
1572
+ true,
1573
+ "live with with different this object, event data, and trigger data"
1574
+ );
1575
+ equal(
1576
+ this["foo"],
1577
+ "bar",
1578
+ "live with with different this object, event data, and trigger data"
1579
+ );
1580
+ equal(
1581
+ data,
1582
+ true,
1583
+ "live with with different this object, event data, and trigger data"
1584
+ );
1585
+ },
1586
+ { foo: "bar" }
1587
+ )
1588
+ );
1186
1589
  jQuery("#foo").trigger("click", true).die("click");
1187
- jQuery("#anchor2").live("click", function() {
1590
+ jQuery("#anchor2").live("click", function () {
1188
1591
  return false;
1189
1592
  });
1190
1593
  var hash = window.location.hash;
1191
1594
  jQuery("#anchor2").trigger("click");
1192
1595
  equal(window.location.hash, hash, "return false worked");
1193
1596
  jQuery("#anchor2").die("click");
1194
- jQuery("#anchor2").live("click", function(e) {
1597
+ jQuery("#anchor2").live("click", function (e) {
1195
1598
  e.preventDefault();
1196
1599
  });
1197
1600
  hash = window.location.hash;
@@ -1227,35 +1630,43 @@
1227
1630
  equal(called, 1, "Verify that one foo occurred.");
1228
1631
  jQuery("#nothiddendiv").die("foo", callback);
1229
1632
  var livec = 0,
1230
- elemDiv = jQuery("#nothiddendivchild").html("<span></span>").get(0);
1231
- jQuery("#nothiddendivchild").live("click", function(e) {
1633
+ elemDiv = jQuery("#nothiddendivchild").html("<span></span>").get(0);
1634
+ jQuery("#nothiddendivchild").live("click", function (e) {
1232
1635
  jQuery("#nothiddendivchild").html("");
1233
1636
  });
1234
- jQuery("#nothiddendivchild").live("click", function(e) {
1637
+ jQuery("#nothiddendivchild").live("click", function (e) {
1235
1638
  if (e.target) {
1236
1639
  livec++;
1237
1640
  }
1238
1641
  });
1239
1642
  jQuery("#nothiddendiv span").click();
1240
- equal(jQuery("#nothiddendiv span").length, 0, "Verify that first handler occurred and modified the DOM.");
1241
- equal(livec, 1, "Verify that second handler occurred even with nuked target.");
1643
+ equal(
1644
+ jQuery("#nothiddendiv span").length,
1645
+ 0,
1646
+ "Verify that first handler occurred and modified the DOM."
1647
+ );
1648
+ equal(
1649
+ livec,
1650
+ 1,
1651
+ "Verify that second handler occurred even with nuked target."
1652
+ );
1242
1653
  jQuery("#nothiddendivchild").die("click");
1243
1654
  var lived = 0,
1244
- livee = 0;
1245
- jQuery("span#liveSpan1 a").live("click", function() {
1655
+ livee = 0;
1656
+ jQuery("span#liveSpan1 a").live("click", function () {
1246
1657
  lived++;
1247
1658
  return false;
1248
1659
  });
1249
- jQuery("span#liveSpan1").live("click", function() {
1660
+ jQuery("span#liveSpan1").live("click", function () {
1250
1661
  livee++;
1251
1662
  });
1252
1663
  jQuery("span#liveSpan1 a").click();
1253
1664
  equal(lived, 1, "Verify that only one first handler occurred.");
1254
1665
  equal(livee, 0, "Verify that second handler doesn't.");
1255
- jQuery("span#liveSpan2").live("click", function() {
1666
+ jQuery("span#liveSpan2").live("click", function () {
1256
1667
  livee++;
1257
1668
  });
1258
- jQuery("span#liveSpan2 a").live("click", function() {
1669
+ jQuery("span#liveSpan2 a").live("click", function () {
1259
1670
  lived++;
1260
1671
  return false;
1261
1672
  });
@@ -1268,11 +1679,23 @@
1268
1679
  jQuery("span#liveSpan1").die("click");
1269
1680
  jQuery("span#liveSpan2 a").die("click");
1270
1681
  jQuery("span#liveSpan2").die("click");
1271
- jQuery("span#liveSpan1").live("click", function(e) {
1682
+ jQuery("span#liveSpan1").live("click", function (e) {
1272
1683
  equal(this.id, "liveSpan1", "Check the this within a live handler");
1273
- equal(e.currentTarget.id, "liveSpan1", "Check the event.currentTarget within a live handler");
1274
- equal(e.delegateTarget, document, "Check the event.delegateTarget within a live handler");
1275
- equal(e.target.nodeName.toUpperCase(), "A", "Check the event.target within a live handler");
1684
+ equal(
1685
+ e.currentTarget.id,
1686
+ "liveSpan1",
1687
+ "Check the event.currentTarget within a live handler"
1688
+ );
1689
+ equal(
1690
+ e.delegateTarget,
1691
+ document,
1692
+ "Check the event.delegateTarget within a live handler"
1693
+ );
1694
+ equal(
1695
+ e.target.nodeName.toUpperCase(),
1696
+ "A",
1697
+ "Check the event.target within a live handler"
1698
+ );
1276
1699
  });
1277
1700
  jQuery("span#liveSpan1 a").click();
1278
1701
  jQuery("span#liveSpan1").die("click");
@@ -1280,11 +1703,11 @@
1280
1703
  function clickB() {
1281
1704
  livee++;
1282
1705
  }
1283
- jQuery("#nothiddendiv div").live("click", function() {
1706
+ jQuery("#nothiddendiv div").live("click", function () {
1284
1707
  livee++;
1285
1708
  });
1286
1709
  jQuery("#nothiddendiv div").live("click", clickB);
1287
- jQuery("#nothiddendiv div").live("mouseover", function() {
1710
+ jQuery("#nothiddendiv div").live("mouseover", function () {
1288
1711
  livee++;
1289
1712
  });
1290
1713
  equal(livee, 0, "No clicks, deep selector.");
@@ -1306,15 +1729,18 @@
1306
1729
  jQuery("#nothiddendivchild").trigger("click");
1307
1730
  equal(livee, 1, "Click, deep selector.");
1308
1731
  jQuery("#nothiddendiv div").die("click");
1309
- jQuery("#nothiddendiv div").live("blur", function() {
1310
- ok(true, "Live div trigger blur.");
1311
- }).trigger("blur").die("blur");
1312
- });
1313
- test("die all bound events", function() {
1732
+ jQuery("#nothiddendiv div")
1733
+ .live("blur", function () {
1734
+ ok(true, "Live div trigger blur.");
1735
+ })
1736
+ .trigger("blur")
1737
+ .die("blur");
1738
+ });
1739
+ test("die all bound events", function () {
1314
1740
  expect(1);
1315
1741
  var count = 0;
1316
1742
  var div = jQuery("div#nothiddendivchild");
1317
- div.live("click submit", function() {
1743
+ div.live("click submit", function () {
1318
1744
  count++;
1319
1745
  });
1320
1746
  div.die();
@@ -1322,11 +1748,11 @@
1322
1748
  div.trigger("submit");
1323
1749
  equal(count, 0, "Make sure no events were triggered.");
1324
1750
  });
1325
- test("live with multiple events", function() {
1751
+ test("live with multiple events", function () {
1326
1752
  expect(1);
1327
1753
  var count = 0;
1328
1754
  var div = jQuery("div#nothiddendivchild");
1329
- div.live("click submit", function() {
1755
+ div.live("click submit", function () {
1330
1756
  count++;
1331
1757
  });
1332
1758
  div.trigger("click");
@@ -1334,15 +1760,15 @@
1334
1760
  equal(count, 2, "Make sure both the click and submit were triggered.");
1335
1761
  div.die();
1336
1762
  });
1337
- test("live with namespaces", function() {
1763
+ test("live with namespaces", function () {
1338
1764
  expect(15);
1339
1765
  var count1 = 0,
1340
- count2 = 0;
1341
- jQuery("#liveSpan1").live("foo.bar", function(e) {
1766
+ count2 = 0;
1767
+ jQuery("#liveSpan1").live("foo.bar", function (e) {
1342
1768
  equal(e.namespace, "bar", "namespace is bar");
1343
1769
  count1++;
1344
1770
  });
1345
- jQuery("#liveSpan1").live("foo.zed", function(e) {
1771
+ jQuery("#liveSpan1").live("foo.zed", function (e) {
1346
1772
  equal(e.namespace, "zed", "namespace is zed");
1347
1773
  count2++;
1348
1774
  });
@@ -1375,18 +1801,18 @@
1375
1801
  equal(count1, 0, "Did not trigger foo.zed again");
1376
1802
  equal(count2, 0, "Did not trigger foo.zed again");
1377
1803
  });
1378
- test("live with change", function() {
1804
+ test("live with change", function () {
1379
1805
  expect(8);
1380
1806
  var selectChange = 0,
1381
- checkboxChange = 0;
1807
+ checkboxChange = 0;
1382
1808
  var select = jQuery("select[name='S1']");
1383
- select.live("change", function() {
1809
+ select.live("change", function () {
1384
1810
  selectChange++;
1385
1811
  });
1386
1812
  var checkbox = jQuery("#check2"),
1387
- checkboxFunction = function() {
1388
- checkboxChange++;
1389
- };
1813
+ checkboxFunction = function () {
1814
+ checkboxChange++;
1815
+ };
1390
1816
  checkbox.live("change", checkboxFunction);
1391
1817
  selectChange = 0;
1392
1818
  select[0].selectedIndex = select[0].selectedIndex ? 0 : 1;
@@ -1399,9 +1825,9 @@
1399
1825
  checkbox.trigger("change");
1400
1826
  equal(checkboxChange, 1, "Change on checkbox.");
1401
1827
  var text = jQuery("#name"),
1402
- textChange = 0,
1403
- oldTextVal = text.val();
1404
- text.live("change", function() {
1828
+ textChange = 0,
1829
+ oldTextVal = text.val();
1830
+ text.live("change", function () {
1405
1831
  textChange++;
1406
1832
  });
1407
1833
  text.val(oldTextVal + "foo");
@@ -1410,9 +1836,9 @@
1410
1836
  text.val(oldTextVal);
1411
1837
  text.die("change");
1412
1838
  var password = jQuery("#name"),
1413
- passwordChange = 0,
1414
- oldPasswordVal = password.val();
1415
- password.live("change", function() {
1839
+ passwordChange = 0,
1840
+ oldPasswordVal = password.val();
1841
+ password.live("change", function () {
1416
1842
  passwordChange++;
1417
1843
  });
1418
1844
  password.val(oldPasswordVal + "foo");
@@ -1433,22 +1859,22 @@
1433
1859
  checkbox.trigger("change");
1434
1860
  equal(checkboxChange, 1, "Die on checkbox.");
1435
1861
  });
1436
- test("live with submit", function() {
1862
+ test("live with submit", function () {
1437
1863
  expect(7);
1438
1864
  var count1 = 0,
1439
- count2 = 0;
1440
- jQuery("#testForm").live("submit", function(ev) {
1865
+ count2 = 0;
1866
+ jQuery("#testForm").live("submit", function (ev) {
1441
1867
  count1++;
1442
1868
  ev.preventDefault();
1443
1869
  });
1444
- jQuery("body").live("submit", function(ev) {
1870
+ jQuery("body").live("submit", function (ev) {
1445
1871
  count2++;
1446
1872
  ev.preventDefault();
1447
1873
  });
1448
1874
  jQuery("#testForm input[name=sub1]").submit();
1449
1875
  equal(count1, 1, "Verify form submit.");
1450
1876
  equal(count2, 1, "Verify body submit.");
1451
- jQuery("#testForm input[name=sub1]").live("click", function(ev) {
1877
+ jQuery("#testForm input[name=sub1]").live("click", function (ev) {
1452
1878
  ok(true, "cancelling submit still calls click handler");
1453
1879
  });
1454
1880
  jQuery("#testForm input[name=sub1]")[0].click();
@@ -1461,29 +1887,29 @@
1461
1887
  jQuery("#testForm input[name=sub1]").die("click");
1462
1888
  jQuery("body").die("submit");
1463
1889
  });
1464
- test("live with special events", function() {
1890
+ test("live with special events", function () {
1465
1891
  expect(13);
1466
1892
  jQuery.event.special["foo"] = {
1467
- setup: function(data, namespaces, handler) {
1893
+ setup: function (data, namespaces, handler) {
1468
1894
  ok(true, "Setup run.");
1469
1895
  },
1470
- teardown: function(namespaces) {
1896
+ teardown: function (namespaces) {
1471
1897
  ok(true, "Teardown run.");
1472
1898
  },
1473
- add: function(handleObj) {
1899
+ add: function (handleObj) {
1474
1900
  ok(true, "Add run.");
1475
1901
  },
1476
- remove: function(handleObj) {
1902
+ remove: function (handleObj) {
1477
1903
  ok(true, "Remove run.");
1478
1904
  },
1479
- _default: function(event, arg) {
1905
+ _default: function (event, arg) {
1480
1906
  ok(event.type === "foo" && arg == 42, "Default run with correct args.");
1481
- }
1907
+ },
1482
1908
  };
1483
- jQuery("#liveSpan1").live("foo.a", function(e) {
1909
+ jQuery("#liveSpan1").live("foo.a", function (e) {
1484
1910
  ok(true, "Handler 1 run.");
1485
1911
  });
1486
- jQuery("#liveSpan1").live("foo.b", function(e) {
1912
+ jQuery("#liveSpan1").live("foo.b", function (e) {
1487
1913
  ok(true, "Handler 2 run.");
1488
1914
  });
1489
1915
  jQuery("#liveSpan1").trigger("foo", 42);
@@ -1493,23 +1919,23 @@
1493
1919
  jQuery("#liveSpan1").die("foo");
1494
1920
  delete jQuery.event.special["foo"];
1495
1921
  });
1496
- test(".delegate()/.undelegate()", function() {
1922
+ test(".delegate()/.undelegate()", function () {
1497
1923
  expect(65);
1498
1924
  var submit = 0,
1499
- div = 0,
1500
- livea = 0,
1501
- liveb = 0;
1502
- jQuery("#body").delegate("div", "submit", function() {
1925
+ div = 0,
1926
+ livea = 0,
1927
+ liveb = 0;
1928
+ jQuery("#body").delegate("div", "submit", function () {
1503
1929
  submit++;
1504
1930
  return false;
1505
1931
  });
1506
- jQuery("#body").delegate("div", "click", function() {
1932
+ jQuery("#body").delegate("div", "click", function () {
1507
1933
  div++;
1508
1934
  });
1509
- jQuery("#body").delegate("div#nothiddendiv", "click", function() {
1935
+ jQuery("#body").delegate("div#nothiddendiv", "click", function () {
1510
1936
  livea++;
1511
1937
  });
1512
- jQuery("#body").delegate("div#nothiddendivchild", "click", function() {
1938
+ jQuery("#body").delegate("div#nothiddendivchild", "click", function () {
1513
1939
  liveb++;
1514
1940
  });
1515
1941
  jQuery("body").trigger("click");
@@ -1576,7 +2002,7 @@
1576
2002
  div = 0;
1577
2003
  livea = 0;
1578
2004
  liveb = 0;
1579
- jQuery("#body").delegate("div#nothiddendivchild", "click", function(e) {
2005
+ jQuery("#body").delegate("div#nothiddendivchild", "click", function (e) {
1580
2006
  liveb++;
1581
2007
  e.stopPropagation();
1582
2008
  });
@@ -1598,8 +2024,8 @@
1598
2024
  jQuery("#body").undelegate("div", "click");
1599
2025
  jQuery("#body").undelegate("div", "submit");
1600
2026
  var clicked = 0,
1601
- container = jQuery("#qunit-fixture")[0];
1602
- jQuery("#qunit-fixture").delegate("#foo", "click", function(e) {
2027
+ container = jQuery("#qunit-fixture")[0];
2028
+ jQuery("#qunit-fixture").delegate("#foo", "click", function (e) {
1603
2029
  clicked++;
1604
2030
  });
1605
2031
  jQuery("div").trigger("click");
@@ -1610,36 +2036,63 @@
1610
2036
  jQuery("#qunit-fixture").undelegate("#foo", "click");
1611
2037
  jQuery("#foo").trigger("click");
1612
2038
  equal(clicked, 2, "undelegate with a context");
1613
- jQuery("#body").delegate("#foo", "click", true, function(e) {
2039
+ jQuery("#body").delegate("#foo", "click", true, function (e) {
1614
2040
  equal(e.data, true, "delegate with event data");
1615
2041
  });
1616
2042
  jQuery("#foo").trigger("click");
1617
2043
  jQuery("#body").undelegate("#foo", "click");
1618
- jQuery("#body").delegate("#foo", "click", function(e, data) {
2044
+ jQuery("#body").delegate("#foo", "click", function (e, data) {
1619
2045
  equal(data, true, "delegate with trigger data");
1620
2046
  });
1621
2047
  jQuery("#foo").trigger("click", true);
1622
2048
  jQuery("#body").undelegate("#foo", "click");
1623
- jQuery("#body").delegate("#foo", "click", jQuery.proxy(function(e) {
1624
- equal(this["foo"], "bar", "delegate with event scope");
1625
- }, {"foo": "bar"}));
2049
+ jQuery("#body").delegate(
2050
+ "#foo",
2051
+ "click",
2052
+ jQuery.proxy(
2053
+ function (e) {
2054
+ equal(this["foo"], "bar", "delegate with event scope");
2055
+ },
2056
+ { foo: "bar" }
2057
+ )
2058
+ );
1626
2059
  jQuery("#foo").trigger("click");
1627
2060
  jQuery("#body").undelegate("#foo", "click");
1628
- jQuery("#body").delegate("#foo", "click", true, jQuery.proxy(function(e, data) {
1629
- equal(e.data, true, "delegate with with different this object, event data, and trigger data");
1630
- equal(this.foo, "bar", "delegate with with different this object, event data, and trigger data");
1631
- equal(data, true, "delegate with with different this object, event data, and trigger data");
1632
- }, {"foo": "bar"}));
2061
+ jQuery("#body").delegate(
2062
+ "#foo",
2063
+ "click",
2064
+ true,
2065
+ jQuery.proxy(
2066
+ function (e, data) {
2067
+ equal(
2068
+ e.data,
2069
+ true,
2070
+ "delegate with with different this object, event data, and trigger data"
2071
+ );
2072
+ equal(
2073
+ this.foo,
2074
+ "bar",
2075
+ "delegate with with different this object, event data, and trigger data"
2076
+ );
2077
+ equal(
2078
+ data,
2079
+ true,
2080
+ "delegate with with different this object, event data, and trigger data"
2081
+ );
2082
+ },
2083
+ { foo: "bar" }
2084
+ )
2085
+ );
1633
2086
  jQuery("#foo").trigger("click", true);
1634
2087
  jQuery("#body").undelegate("#foo", "click");
1635
- jQuery("#body").delegate("#anchor2", "click", function() {
2088
+ jQuery("#body").delegate("#anchor2", "click", function () {
1636
2089
  return false;
1637
2090
  });
1638
2091
  var hash = window.location.hash;
1639
2092
  jQuery("#anchor2").trigger("click");
1640
2093
  equal(window.location.hash, hash, "return false worked");
1641
2094
  jQuery("#body").undelegate("#anchor2", "click");
1642
- jQuery("#body").delegate("#anchor2", "click", function(e) {
2095
+ jQuery("#body").delegate("#anchor2", "click", function (e) {
1643
2096
  e.preventDefault();
1644
2097
  });
1645
2098
  hash = window.location.hash;
@@ -1675,35 +2128,43 @@
1675
2128
  equal(called, 1, "Verify that one foo occurred.");
1676
2129
  jQuery("#body").undelegate("#nothiddendiv", "foo", callback);
1677
2130
  var livec = 0,
1678
- elemDiv = jQuery("#nothiddendivchild").html("<span></span>").get(0);
1679
- jQuery("#body").delegate("#nothiddendivchild", "click", function(e) {
2131
+ elemDiv = jQuery("#nothiddendivchild").html("<span></span>").get(0);
2132
+ jQuery("#body").delegate("#nothiddendivchild", "click", function (e) {
1680
2133
  jQuery("#nothiddendivchild").html("");
1681
2134
  });
1682
- jQuery("#body").delegate("#nothiddendivchild", "click", function(e) {
2135
+ jQuery("#body").delegate("#nothiddendivchild", "click", function (e) {
1683
2136
  if (e.target) {
1684
2137
  livec++;
1685
2138
  }
1686
2139
  });
1687
2140
  jQuery("#nothiddendiv span").click();
1688
- equal(jQuery("#nothiddendiv span").length, 0, "Verify that first handler occurred and modified the DOM.");
1689
- equal(livec, 1, "Verify that second handler occurred even with nuked target.");
2141
+ equal(
2142
+ jQuery("#nothiddendiv span").length,
2143
+ 0,
2144
+ "Verify that first handler occurred and modified the DOM."
2145
+ );
2146
+ equal(
2147
+ livec,
2148
+ 1,
2149
+ "Verify that second handler occurred even with nuked target."
2150
+ );
1690
2151
  jQuery("#body").undelegate("#nothiddendivchild", "click");
1691
2152
  var lived = 0,
1692
- livee = 0;
1693
- jQuery("#body").delegate("span#liveSpan1 a", "click", function() {
2153
+ livee = 0;
2154
+ jQuery("#body").delegate("span#liveSpan1 a", "click", function () {
1694
2155
  lived++;
1695
2156
  return false;
1696
2157
  });
1697
- jQuery("#body").delegate("span#liveSpan1", "click", function() {
2158
+ jQuery("#body").delegate("span#liveSpan1", "click", function () {
1698
2159
  livee++;
1699
2160
  });
1700
2161
  jQuery("span#liveSpan1 a").click();
1701
2162
  equal(lived, 1, "Verify that only one first handler occurred.");
1702
2163
  equal(livee, 0, "Verify that second handler doesn't.");
1703
- jQuery("#body").delegate("span#liveSpan2", "click", function() {
2164
+ jQuery("#body").delegate("span#liveSpan2", "click", function () {
1704
2165
  livee++;
1705
2166
  });
1706
- jQuery("#body").delegate("span#liveSpan2 a", "click", function() {
2167
+ jQuery("#body").delegate("span#liveSpan2 a", "click", function () {
1707
2168
  lived++;
1708
2169
  return false;
1709
2170
  });
@@ -1713,11 +2174,23 @@
1713
2174
  equal(lived, 1, "Verify that only one first handler occurred.");
1714
2175
  equal(livee, 0, "Verify that second handler doesn't.");
1715
2176
  jQuery("#body").undelegate("click");
1716
- jQuery("#body").delegate("span#liveSpan1", "click", function(e) {
2177
+ jQuery("#body").delegate("span#liveSpan1", "click", function (e) {
1717
2178
  equal(this.id, "liveSpan1", "Check the this within a delegate handler");
1718
- equal(e.currentTarget.id, "liveSpan1", "Check the event.currentTarget within a delegate handler");
1719
- equal(e.delegateTarget, document.body, "Check the event.delegateTarget within a delegate handler");
1720
- equal(e.target.nodeName.toUpperCase(), "A", "Check the event.target within a delegate handler");
2179
+ equal(
2180
+ e.currentTarget.id,
2181
+ "liveSpan1",
2182
+ "Check the event.currentTarget within a delegate handler"
2183
+ );
2184
+ equal(
2185
+ e.delegateTarget,
2186
+ document.body,
2187
+ "Check the event.delegateTarget within a delegate handler"
2188
+ );
2189
+ equal(
2190
+ e.target.nodeName.toUpperCase(),
2191
+ "A",
2192
+ "Check the event.target within a delegate handler"
2193
+ );
1721
2194
  });
1722
2195
  jQuery("span#liveSpan1 a").click();
1723
2196
  jQuery("#body").undelegate("span#liveSpan1", "click");
@@ -1725,11 +2198,11 @@
1725
2198
  function clickB() {
1726
2199
  livee++;
1727
2200
  }
1728
- jQuery("#body").delegate("#nothiddendiv div", "click", function() {
2201
+ jQuery("#body").delegate("#nothiddendiv div", "click", function () {
1729
2202
  livee++;
1730
2203
  });
1731
2204
  jQuery("#body").delegate("#nothiddendiv div", "click", clickB);
1732
- jQuery("#body").delegate("#nothiddendiv div", "mouseover", function() {
2205
+ jQuery("#body").delegate("#nothiddendiv div", "mouseover", function () {
1733
2206
  livee++;
1734
2207
  });
1735
2208
  equal(livee, 0, "No clicks, deep selector.");
@@ -1752,51 +2225,80 @@
1752
2225
  equal(livee, 1, "Click, deep selector.");
1753
2226
  jQuery("#body").undelegate("#nothiddendiv div", "click");
1754
2227
  });
1755
- test("jQuery.off using dispatched jQuery.Event", function() {
2228
+ test("jQuery.off using dispatched jQuery.Event", function () {
1756
2229
  expect(1);
1757
2230
  var markup = jQuery('<p><a href="#">target</a></p>'),
1758
- count = 0;
1759
- markup.on("click.name", "a", function(event) {
1760
- equal(++count, 1, "event called once before removal");
1761
- jQuery().off(event);
1762
- }).find("a").click().click().end().remove();
1763
- });
1764
- test("delegated event with delegateTarget-relative selector", function() {
1765
- var markup = jQuery("<ul><li><a id=\"a0\"></a><ul id=\"ul0\"><li class=test><a id=\"a0_0\"></a></li><li><a id=\"a0_1\"></a></li></ul></li></ul>").appendTo("#qunit-fixture");
1766
- markup.on("click", ">li>a", function() {
1767
- ok(this.id === "a0", "child li was clicked");
1768
- }).find("#ul0").on("click", "li:first>a", function() {
1769
- ok(this.id === "a0_0", "first li under #u10 was clicked");
1770
- }).end().find("a").click().end().find("#ul0").off();
2231
+ count = 0;
2232
+ markup
2233
+ .on("click.name", "a", function (event) {
2234
+ equal(++count, 1, "event called once before removal");
2235
+ jQuery().off(event);
2236
+ })
2237
+ .find("a")
2238
+ .click()
2239
+ .click()
2240
+ .end()
2241
+ .remove();
2242
+ });
2243
+ test("delegated event with delegateTarget-relative selector", function () {
2244
+ var markup = jQuery(
2245
+ '<ul><li><a id="a0"></a><ul id="ul0"><li class=test><a id="a0_0"></a></li><li><a id="a0_1"></a></li></ul></li></ul>'
2246
+ ).appendTo("#qunit-fixture");
2247
+ markup
2248
+ .on("click", ">li>a", function () {
2249
+ ok(this.id === "a0", "child li was clicked");
2250
+ })
2251
+ .find("#ul0")
2252
+ .on("click", "li:first>a", function () {
2253
+ ok(this.id === "a0_0", "first li under #u10 was clicked");
2254
+ })
2255
+ .end()
2256
+ .find("a")
2257
+ .click()
2258
+ .end()
2259
+ .find("#ul0")
2260
+ .off();
1771
2261
  markup = markup.wrap("<div />").parent();
1772
- markup.find("#ul0").on("click", "div li a", function() {
1773
- ok(false, "div is ABOVE the delegation point!");
1774
- }).on("click", "ul a", function() {
1775
- ok(false, "ul is the delegation point!");
1776
- }).on("click", "li.test a", function() {
1777
- ok(true, "li.test is below the delegation point.");
1778
- }).find("#a0_0").click();
2262
+ markup
2263
+ .find("#ul0")
2264
+ .on("click", "div li a", function () {
2265
+ ok(false, "div is ABOVE the delegation point!");
2266
+ })
2267
+ .on("click", "ul a", function () {
2268
+ ok(false, "ul is the delegation point!");
2269
+ })
2270
+ .on("click", "li.test a", function () {
2271
+ ok(true, "li.test is below the delegation point.");
2272
+ })
2273
+ .find("#a0_0")
2274
+ .click();
1779
2275
  markup.remove();
1780
2276
  });
1781
- test("stopPropagation() stops directly-bound events on delegated target", function() {
2277
+ test("stopPropagation() stops directly-bound events on delegated target", function () {
1782
2278
  expect(1);
1783
- var markup = jQuery("<div><p><a href=\"#\">target</a></p></div>");
1784
- markup.on("click", function() {
1785
- ok(false, "directly-bound event on delegate target was called");
1786
- }).on("click", "a", function(e) {
1787
- e.stopPropagation();
1788
- ok(true, "delegated handler was called");
1789
- }).find("a").click().end().remove();
1790
- });
1791
- test("undelegate all bound events", function() {
2279
+ var markup = jQuery('<div><p><a href="#">target</a></p></div>');
2280
+ markup
2281
+ .on("click", function () {
2282
+ ok(false, "directly-bound event on delegate target was called");
2283
+ })
2284
+ .on("click", "a", function (e) {
2285
+ e.stopPropagation();
2286
+ ok(true, "delegated handler was called");
2287
+ })
2288
+ .find("a")
2289
+ .click()
2290
+ .end()
2291
+ .remove();
2292
+ });
2293
+ test("undelegate all bound events", function () {
1792
2294
  expect(2);
1793
2295
  var count = 0,
1794
- clicks = 0,
1795
- div = jQuery("#body");
1796
- div.delegate("div#nothiddendivchild", "click submit", function() {
2296
+ clicks = 0,
2297
+ div = jQuery("#body");
2298
+ div.delegate("div#nothiddendivchild", "click submit", function () {
1797
2299
  count++;
1798
2300
  });
1799
- div.bind("click", function() {
2301
+ div.bind("click", function () {
1800
2302
  clicks++;
1801
2303
  });
1802
2304
  div.undelegate();
@@ -1807,11 +2309,11 @@
1807
2309
  equal(clicks, 2, "Make sure delegated and directly bound event occurred.");
1808
2310
  div.unbind("click");
1809
2311
  });
1810
- test("delegate with multiple events", function() {
2312
+ test("delegate with multiple events", function () {
1811
2313
  expect(1);
1812
2314
  var count = 0;
1813
2315
  var div = jQuery("#body");
1814
- div.delegate("div#nothiddendivchild", "click submit", function() {
2316
+ div.delegate("div#nothiddendivchild", "click submit", function () {
1815
2317
  count++;
1816
2318
  });
1817
2319
  jQuery("div#nothiddendivchild").trigger("click");
@@ -1819,18 +2321,18 @@
1819
2321
  equal(count, 2, "Make sure both the click and submit were triggered.");
1820
2322
  jQuery("#body").undelegate();
1821
2323
  });
1822
- test("delegate with change", function() {
2324
+ test("delegate with change", function () {
1823
2325
  expect(8);
1824
2326
  var selectChange = 0,
1825
- checkboxChange = 0;
2327
+ checkboxChange = 0;
1826
2328
  var select = jQuery("select[name='S1']");
1827
- jQuery("#body").delegate("select[name='S1']", "change", function() {
2329
+ jQuery("#body").delegate("select[name='S1']", "change", function () {
1828
2330
  selectChange++;
1829
2331
  });
1830
2332
  var checkbox = jQuery("#check2"),
1831
- checkboxFunction = function() {
1832
- checkboxChange++;
1833
- };
2333
+ checkboxFunction = function () {
2334
+ checkboxChange++;
2335
+ };
1834
2336
  jQuery("#body").delegate("#check2", "change", checkboxFunction);
1835
2337
  selectChange = 0;
1836
2338
  select[0].selectedIndex = select[0].selectedIndex ? 0 : 1;
@@ -1843,9 +2345,9 @@
1843
2345
  checkbox.trigger("change");
1844
2346
  equal(checkboxChange, 1, "Change on checkbox.");
1845
2347
  var text = jQuery("#name"),
1846
- textChange = 0,
1847
- oldTextVal = text.val();
1848
- jQuery("#body").delegate("#name", "change", function() {
2348
+ textChange = 0,
2349
+ oldTextVal = text.val();
2350
+ jQuery("#body").delegate("#name", "change", function () {
1849
2351
  textChange++;
1850
2352
  });
1851
2353
  text.val(oldTextVal + "foo");
@@ -1854,9 +2356,9 @@
1854
2356
  text.val(oldTextVal);
1855
2357
  jQuery("#body").die("change");
1856
2358
  var password = jQuery("#name"),
1857
- passwordChange = 0,
1858
- oldPasswordVal = password.val();
1859
- jQuery("#body").delegate("#name", "change", function() {
2359
+ passwordChange = 0,
2360
+ oldPasswordVal = password.val();
2361
+ jQuery("#body").delegate("#name", "change", function () {
1860
2362
  passwordChange++;
1861
2363
  });
1862
2364
  password.val(oldPasswordVal + "foo");
@@ -1877,14 +2379,14 @@
1877
2379
  checkbox.trigger("change");
1878
2380
  equal(checkboxChange, 1, "Die on checkbox.");
1879
2381
  });
1880
- test("delegate with submit", function() {
2382
+ test("delegate with submit", function () {
1881
2383
  var count1 = 0,
1882
- count2 = 0;
1883
- jQuery("#body").delegate("#testForm", "submit", function(ev) {
2384
+ count2 = 0;
2385
+ jQuery("#body").delegate("#testForm", "submit", function (ev) {
1884
2386
  count1++;
1885
2387
  ev.preventDefault();
1886
2388
  });
1887
- jQuery(document).delegate("body", "submit", function(ev) {
2389
+ jQuery(document).delegate("body", "submit", function (ev) {
1888
2390
  count2++;
1889
2391
  ev.preventDefault();
1890
2392
  });
@@ -1894,11 +2396,11 @@
1894
2396
  jQuery("#body").undelegate();
1895
2397
  jQuery(document).undelegate();
1896
2398
  });
1897
- test("undelegate() with only namespaces", function() {
2399
+ test("undelegate() with only namespaces", function () {
1898
2400
  expect(2);
1899
2401
  var $delegate = jQuery("#liveHandlerOrder"),
1900
- count = 0;
1901
- $delegate.delegate("a", "click.ns", function(e) {
2402
+ count = 0;
2403
+ $delegate.delegate("a", "click.ns", function (e) {
1902
2404
  count++;
1903
2405
  });
1904
2406
  jQuery("a", $delegate).eq(0).trigger("click.ns");
@@ -1907,41 +2409,47 @@
1907
2409
  jQuery("a", $delegate).eq(1).trigger("click.ns");
1908
2410
  equal(count, 1, "no more .ns after undelegate");
1909
2411
  });
1910
- test("Non DOM element events", function() {
2412
+ test("Non DOM element events", function () {
1911
2413
  expect(1);
1912
2414
  var o = {};
1913
- jQuery(o).bind("nonelementobj", function(e) {
2415
+ jQuery(o).bind("nonelementobj", function (e) {
1914
2416
  ok(true, "Event on non-DOM object triggered");
1915
2417
  });
1916
2418
  jQuery(o).trigger("nonelementobj");
1917
2419
  });
1918
- test("inline handler returning false stops default", function() {
2420
+ test("inline handler returning false stops default", function () {
1919
2421
  expect(1);
1920
- var markup = jQuery("<div><a href=\"#\" onclick=\"return false\">x</a></div>");
1921
- markup.click(function(e) {
2422
+ var markup = jQuery('<div><a href="#" onclick="return false">x</a></div>');
2423
+ markup.click(function (e) {
1922
2424
  ok(e.isDefaultPrevented(), "inline handler prevented default");
1923
2425
  return false;
1924
2426
  });
1925
2427
  markup.find("a").click();
1926
2428
  markup.off("click");
1927
2429
  });
1928
- test("window resize", function() {
2430
+ test("window resize", function () {
1929
2431
  expect(2);
1930
2432
  jQuery(window).unbind();
1931
- jQuery(window).bind("resize", function() {
1932
- ok(true, "Resize event fired.");
1933
- }).resize().unbind("resize");
1934
- ok(!jQuery._data(window, "__events__"), "Make sure all the events are gone.");
1935
- });
1936
- test("focusin bubbles", function() {
2433
+ jQuery(window)
2434
+ .bind("resize", function () {
2435
+ ok(true, "Resize event fired.");
2436
+ })
2437
+ .resize()
2438
+ .unbind("resize");
2439
+ ok(
2440
+ !jQuery._data(window, "__events__"),
2441
+ "Make sure all the events are gone."
2442
+ );
2443
+ });
2444
+ test("focusin bubbles", function () {
1937
2445
  expect(2);
1938
2446
  var input = jQuery("<input type='text' />").prependTo("body"),
1939
- order = 0;
2447
+ order = 0;
1940
2448
  input[0].focus();
1941
- jQuery("body").bind("focusin.focusinBubblesTest", function() {
2449
+ jQuery("body").bind("focusin.focusinBubblesTest", function () {
1942
2450
  equal(1, order++, "focusin on the body second");
1943
2451
  });
1944
- input.bind("focusin.focusinBubblesTest", function() {
2452
+ input.bind("focusin.focusinBubblesTest", function () {
1945
2453
  equal(0, order++, "focusin on the element first");
1946
2454
  });
1947
2455
  order = 0;
@@ -1949,9 +2457,11 @@
1949
2457
  input.remove();
1950
2458
  jQuery("body").unbind("focusin.focusinBubblesTest");
1951
2459
  });
1952
- test("custom events with colons (#3533, #8272)", function() {
2460
+ test("custom events with colons (#3533, #8272)", function () {
1953
2461
  expect(1);
1954
- var tab = jQuery("<table><tr><td>trigger</td></tr></table>").appendTo("body");
2462
+ var tab = jQuery("<table><tr><td>trigger</td></tr></table>").appendTo(
2463
+ "body"
2464
+ );
1955
2465
  try {
1956
2466
  tab.trigger("back:forth");
1957
2467
  ok(true, "colon events don't throw");
@@ -1960,104 +2470,206 @@
1960
2470
  }
1961
2471
  tab.remove();
1962
2472
  });
1963
- test(".on and .off", function() {
2473
+ test(".on and .off", function () {
1964
2474
  expect(9);
1965
- var counter,
1966
- mixfn;
1967
- var $onandoff = jQuery("<div id=\"onandoff\"><p>on<b>and</b>off</p><div>worked<em>or</em>borked?</div></div>").appendTo("body");
1968
- jQuery("#onandoff").on("whip", function() {
1969
- ok(true, "whipped it good");
1970
- }).trigger("whip").off();
2475
+ var counter, mixfn;
2476
+ var $onandoff = jQuery(
2477
+ '<div id="onandoff"><p>on<b>and</b>off</p><div>worked<em>or</em>borked?</div></div>'
2478
+ ).appendTo("body");
2479
+ jQuery("#onandoff")
2480
+ .on("whip", function () {
2481
+ ok(true, "whipped it good");
2482
+ })
2483
+ .trigger("whip")
2484
+ .off();
1971
2485
  counter = 0;
1972
- jQuery("#onandoff b").on("click", 5, function(e, trig) {
1973
- counter += e.data + (trig || 9);
1974
- }).one("click", 7, function(e, trig) {
1975
- counter += e.data + (trig || 11);
1976
- }).click().trigger("click", 17).off("click");
2486
+ jQuery("#onandoff b")
2487
+ .on("click", 5, function (e, trig) {
2488
+ counter += e.data + (trig || 9);
2489
+ })
2490
+ .one("click", 7, function (e, trig) {
2491
+ counter += e.data + (trig || 11);
2492
+ })
2493
+ .click()
2494
+ .trigger("click", 17)
2495
+ .off("click");
1977
2496
  equal(counter, 54, "direct event bindings with data");
1978
2497
  counter = 0;
1979
- jQuery("#onandoff").on("click", "em", 5, function(e, trig) {
1980
- counter += e.data + (trig || 9);
1981
- }).one("click", "em", 7, function(e, trig) {
1982
- counter += e.data + (trig || 11);
1983
- }).find("em").click().trigger("click", 17).end().off("click", "em");
2498
+ jQuery("#onandoff")
2499
+ .on("click", "em", 5, function (e, trig) {
2500
+ counter += e.data + (trig || 9);
2501
+ })
2502
+ .one("click", "em", 7, function (e, trig) {
2503
+ counter += e.data + (trig || 11);
2504
+ })
2505
+ .find("em")
2506
+ .click()
2507
+ .trigger("click", 17)
2508
+ .end()
2509
+ .off("click", "em");
1984
2510
  equal(counter, 54, "delegated event bindings with data");
1985
2511
  counter = 0;
1986
- mixfn = function(e, trig) {
2512
+ mixfn = function (e, trig) {
1987
2513
  counter += (e.data || 0) + (trig || 1);
1988
2514
  };
1989
- jQuery("#onandoff").on("click clack cluck", "em", 2, mixfn).on("cluck", "b", 7, mixfn).on("cluck", mixfn).trigger("what!").each(function() {
1990
- equal(counter, 0, "nothing triggered yet");
1991
- }).find("em").one("cluck", 3, mixfn).trigger("cluck", 8).off().trigger("cluck", 9).end().each(function() {
1992
- equal(counter, 49, "after triggering em element");
1993
- }).off("cluck", function() {}).trigger("cluck", 2).each(function() {
1994
- equal(counter, 51, "after triggering #onandoff cluck");
1995
- }).find("b").on("click", 95, mixfn).on("clack", "p", 97, mixfn).one("cluck", 3, mixfn).trigger("quack", 19).off("click clack cluck").end().each(function() {
1996
- equal(counter, 51, "after triggering b");
1997
- }).trigger("cluck", 3).off("clack", "em", mixfn).find("em").trigger("clack").end().each(function() {
1998
- equal(counter, 54, "final triggers");
1999
- }).off("click cluck");
2515
+ jQuery("#onandoff")
2516
+ .on("click clack cluck", "em", 2, mixfn)
2517
+ .on("cluck", "b", 7, mixfn)
2518
+ .on("cluck", mixfn)
2519
+ .trigger("what!")
2520
+ .each(function () {
2521
+ equal(counter, 0, "nothing triggered yet");
2522
+ })
2523
+ .find("em")
2524
+ .one("cluck", 3, mixfn)
2525
+ .trigger("cluck", 8)
2526
+ .off()
2527
+ .trigger("cluck", 9)
2528
+ .end()
2529
+ .each(function () {
2530
+ equal(counter, 49, "after triggering em element");
2531
+ })
2532
+ .off("cluck", function () {})
2533
+ .trigger("cluck", 2)
2534
+ .each(function () {
2535
+ equal(counter, 51, "after triggering #onandoff cluck");
2536
+ })
2537
+ .find("b")
2538
+ .on("click", 95, mixfn)
2539
+ .on("clack", "p", 97, mixfn)
2540
+ .one("cluck", 3, mixfn)
2541
+ .trigger("quack", 19)
2542
+ .off("click clack cluck")
2543
+ .end()
2544
+ .each(function () {
2545
+ equal(counter, 51, "after triggering b");
2546
+ })
2547
+ .trigger("cluck", 3)
2548
+ .off("clack", "em", mixfn)
2549
+ .find("em")
2550
+ .trigger("clack")
2551
+ .end()
2552
+ .each(function () {
2553
+ equal(counter, 54, "final triggers");
2554
+ })
2555
+ .off("click cluck");
2000
2556
  var data = jQuery.data[jQuery("#onandoff")[0].expando] || {};
2001
2557
  equal(data["events"], undefined, "no events left");
2002
2558
  $onandoff.remove();
2003
2559
  });
2004
- test("special bind/delegate name mapping", function() {
2560
+ test("special bind/delegate name mapping", function () {
2005
2561
  expect(7);
2006
2562
  jQuery.event.special["slap"] = {
2007
2563
  bindType: "click",
2008
2564
  delegateType: "swing",
2009
- handle: function(event) {
2010
- equal(event.handleObj.origType, "slap", "slapped your mammy, " + event.type);
2011
- }
2565
+ handle: function (event) {
2566
+ equal(
2567
+ event.handleObj.origType,
2568
+ "slap",
2569
+ "slapped your mammy, " + event.type
2570
+ );
2571
+ },
2012
2572
  };
2013
- var comeback = function(event) {
2573
+ var comeback = function (event) {
2014
2574
  ok(true, "event " + event.type + " triggered");
2015
2575
  };
2016
- jQuery("<div><button id=\"mammy\">Are We Not Men?</button></div>").on("slap", "button", jQuery.noop).on("swing", "button", comeback).find("button").on("slap", jQuery.noop).on("click", comeback).trigger("click").off("slap").trigger("click").off("click").trigger("swing").end().off("slap swing", "button").find("button").trigger("slap").trigger("click").trigger("swing").end().remove();
2576
+ jQuery('<div><button id="mammy">Are We Not Men?</button></div>')
2577
+ .on("slap", "button", jQuery.noop)
2578
+ .on("swing", "button", comeback)
2579
+ .find("button")
2580
+ .on("slap", jQuery.noop)
2581
+ .on("click", comeback)
2582
+ .trigger("click")
2583
+ .off("slap")
2584
+ .trigger("click")
2585
+ .off("click")
2586
+ .trigger("swing")
2587
+ .end()
2588
+ .off("slap swing", "button")
2589
+ .find("button")
2590
+ .trigger("slap")
2591
+ .trigger("click")
2592
+ .trigger("swing")
2593
+ .end()
2594
+ .remove();
2017
2595
  delete jQuery.event.special["slap"];
2018
2596
  jQuery.event.special["gutfeeling"] = {
2019
2597
  bindType: "click",
2020
2598
  delegateType: "click",
2021
- handle: function(event) {
2599
+ handle: function (event) {
2022
2600
  equal(event.handleObj.origType, "gutfeeling", "got a gutfeeling");
2023
2601
  return event.handleObj.handler.call(this, event);
2024
- }
2602
+ },
2025
2603
  };
2026
- jQuery('<p>Gut Feeling</p>').on("click", jQuery.noop).on("gutfeeling", jQuery.noop).off("click").trigger("gutfeeling").remove();
2027
- jQuery('<p>Gut Feeling</p>').on("gutfeeling.Devo", jQuery.noop).off(".Devo").trigger("gutfeeling").remove();
2028
- jQuery('<p>Gut Feeling</p>').one("gutfeeling", jQuery.noop).trigger("gutfeeling").trigger("gutfeeling").remove();
2604
+ jQuery("<p>Gut Feeling</p>")
2605
+ .on("click", jQuery.noop)
2606
+ .on("gutfeeling", jQuery.noop)
2607
+ .off("click")
2608
+ .trigger("gutfeeling")
2609
+ .remove();
2610
+ jQuery("<p>Gut Feeling</p>")
2611
+ .on("gutfeeling.Devo", jQuery.noop)
2612
+ .off(".Devo")
2613
+ .trigger("gutfeeling")
2614
+ .remove();
2615
+ jQuery("<p>Gut Feeling</p>")
2616
+ .one("gutfeeling", jQuery.noop)
2617
+ .trigger("gutfeeling")
2618
+ .trigger("gutfeeling")
2619
+ .remove();
2029
2620
  delete jQuery.event.special["gutfeeling"];
2030
2621
  });
2031
- test(".on and .off, selective mixed removal (#10705)", function() {
2622
+ test(".on and .off, selective mixed removal (#10705)", function () {
2032
2623
  expect(7);
2033
2624
  var clockout = 0,
2034
- timingx = function(e) {
2035
- ok(true, "triggered " + e.type);
2036
- };
2037
- jQuery("<p>Strange Pursuit</p>").on("click", timingx).on("click.duty", timingx).on("click.now", timingx).on("devo", timingx).on("future", timingx).trigger("click").trigger("devo").off(".duty devo ").trigger("future").trigger("click").off("future click").trigger("click");
2038
- });
2039
- test(".on( event-map, null-selector, data ) #11130", function() {
2625
+ timingx = function (e) {
2626
+ ok(true, "triggered " + e.type);
2627
+ };
2628
+ jQuery("<p>Strange Pursuit</p>")
2629
+ .on("click", timingx)
2630
+ .on("click.duty", timingx)
2631
+ .on("click.now", timingx)
2632
+ .on("devo", timingx)
2633
+ .on("future", timingx)
2634
+ .trigger("click")
2635
+ .trigger("devo")
2636
+ .off(".duty devo ")
2637
+ .trigger("future")
2638
+ .trigger("click")
2639
+ .off("future click")
2640
+ .trigger("click");
2641
+ });
2642
+ test(".on( event-map, null-selector, data ) #11130", function () {
2040
2643
  expect(1);
2041
2644
  var $p = jQuery("<p>Strange Pursuit</p>"),
2042
- data = "bar",
2043
- map = {"foo": function(event) {
2044
- equal(event.data, "bar", "event.data correctly relayed with null selector");
2045
- $p.remove();
2046
- }};
2645
+ data = "bar",
2646
+ map = {
2647
+ foo: function (event) {
2648
+ equal(
2649
+ event.data,
2650
+ "bar",
2651
+ "event.data correctly relayed with null selector"
2652
+ );
2653
+ $p.remove();
2654
+ },
2655
+ };
2047
2656
  $p.on(map, null, data).trigger("foo");
2048
2657
  });
2049
- test("clone() delegated events (#11076)", function() {
2658
+ test("clone() delegated events (#11076)", function () {
2050
2659
  expect(3);
2051
2660
  var counter = {
2052
- "center": 0,
2053
- "fold": 0,
2054
- "centerfold": 0
2055
- },
2056
- clicked = function(event) {
2057
- counter[jQuery(this).text().replace(/\s+/, "")]++;
2058
- },
2059
- table = jQuery("<table><tr><td>center</td><td>fold</td></tr></table>").on("click", "tr", clicked).on("click", "td:first-child", clicked).on("click", "td:last-child", clicked),
2060
- clone = table.clone(true);
2661
+ center: 0,
2662
+ fold: 0,
2663
+ centerfold: 0,
2664
+ },
2665
+ clicked = function (event) {
2666
+ counter[jQuery(this).text().replace(/\s+/, "")]++;
2667
+ },
2668
+ table = jQuery("<table><tr><td>center</td><td>fold</td></tr></table>")
2669
+ .on("click", "tr", clicked)
2670
+ .on("click", "td:first-child", clicked)
2671
+ .on("click", "td:last-child", clicked),
2672
+ clone = table.clone(true);
2061
2673
  clone.find("td").click();
2062
2674
  equal(counter["center"], 1, "first child");
2063
2675
  equal(counter["fold"], 1, "last child");
@@ -2065,50 +2677,73 @@
2065
2677
  table.remove();
2066
2678
  clone.remove();
2067
2679
  });
2068
- test("fixHooks extensions", function() {
2680
+ test("fixHooks extensions", function () {
2069
2681
  expect(2);
2070
- var $fixture = jQuery("<input type='text' id='hook-fixture' />").appendTo("body"),
2071
- saved = jQuery.event.fixHooks.click;
2072
- $fixture.bind("click", function(event) {
2682
+ var $fixture = jQuery("<input type='text' id='hook-fixture' />").appendTo(
2683
+ "body"
2684
+ ),
2685
+ saved = jQuery.event.fixHooks.click;
2686
+ $fixture.bind("click", function (event) {
2073
2687
  ok(!("blurrinessLevel" in event), "event.blurrinessLevel does not exist");
2074
2688
  });
2075
- fireNative($fixture[0], 'click');
2689
+ fireNative($fixture[0], "click");
2076
2690
  $fixture.unbind("click");
2077
- jQuery.event.fixHooks.click = {filter: function(event, originalEvent) {
2691
+ jQuery.event.fixHooks.click = {
2692
+ filter: function (event, originalEvent) {
2078
2693
  event.blurrinessLevel = 42;
2079
2694
  return event;
2080
- }};
2081
- $fixture.bind("click", function(event) {
2695
+ },
2696
+ };
2697
+ $fixture.bind("click", function (event) {
2082
2698
  equal(event.blurrinessLevel, 42, "event.blurrinessLevel was set");
2083
2699
  });
2084
- fireNative($fixture[0], 'click');
2700
+ fireNative($fixture[0], "click");
2085
2701
  delete jQuery.event.fixHooks.click;
2086
2702
  $fixture.unbind("click").remove();
2087
2703
  jQuery.event.fixHooks.click = saved;
2088
2704
  });
2089
- testIframeWithCallback("jQuery.ready promise", "event/promiseReady.html", function(isOk) {
2090
- expect(1);
2091
- ok(isOk, "$.when( $.ready ) works");
2092
- });
2093
- if (hasPHP) {
2094
- testIframeWithCallback("jQuery.ready synchronous load with long loading subresources", "event/syncReady.html", function(isOk) {
2705
+ testIframeWithCallback(
2706
+ "jQuery.ready promise",
2707
+ "event/promiseReady.html",
2708
+ function (isOk) {
2095
2709
  expect(1);
2096
- ok(isOk, "jQuery loaded synchronously fires ready when the DOM can truly be interacted with");
2097
- });
2710
+ ok(isOk, "$.when( $.ready ) works");
2711
+ }
2712
+ );
2713
+ if (hasPHP) {
2714
+ testIframeWithCallback(
2715
+ "jQuery.ready synchronous load with long loading subresources",
2716
+ "event/syncReady.html",
2717
+ function (isOk) {
2718
+ expect(1);
2719
+ ok(
2720
+ isOk,
2721
+ "jQuery loaded synchronously fires ready when the DOM can truly be interacted with"
2722
+ );
2723
+ }
2724
+ );
2098
2725
  }
2099
- (function() {
2726
+ (function () {
2100
2727
  var notYetReady,
2101
- noEarlyExecution,
2102
- order = [],
2103
- args = {};
2728
+ noEarlyExecution,
2729
+ order = [],
2730
+ args = {};
2104
2731
  notYetReady = !jQuery.isReady;
2105
- test("jQuery.isReady", function() {
2732
+ test("jQuery.isReady", function () {
2106
2733
  expect(2);
2107
- equal(notYetReady, true, "jQuery.isReady should not be true before DOM ready");
2108
- equal(jQuery.isReady, true, "jQuery.isReady should be true once DOM is ready");
2734
+ equal(
2735
+ notYetReady,
2736
+ true,
2737
+ "jQuery.isReady should not be true before DOM ready"
2738
+ );
2739
+ equal(
2740
+ jQuery.isReady,
2741
+ true,
2742
+ "jQuery.isReady should be true once DOM is ready"
2743
+ );
2109
2744
  });
2110
2745
  function makeHandler(testId) {
2111
- return function(arg) {
2746
+ return function (arg) {
2112
2747
  order.push(testId);
2113
2748
  args[testId] = arg;
2114
2749
  };
@@ -2120,47 +2755,89 @@
2120
2755
  jQuery(document).ready(makeHandler("e"));
2121
2756
  jQuery(document).bind("ready.readytest", makeHandler("f"));
2122
2757
  noEarlyExecution = order.length === 0;
2123
- test("jQuery ready", function() {
2758
+ test("jQuery ready", function () {
2124
2759
  expect(10);
2125
- ok(noEarlyExecution, "Handlers bound to DOM ready should not execute before DOM ready");
2126
- deepEqual(order, ["a", "b", "d", "e", "c", "f"], "Bound DOM ready handlers should execute in bind-order, but those bound with jQuery(document).bind( 'ready', fn ) will always execute last");
2127
- equal(args["a"], jQuery, "Argument passed to fn in jQuery( fn ) should be jQuery");
2128
- equal(args["b"], jQuery, "Argument passed to fn in jQuery(document).ready( fn ) should be jQuery");
2129
- ok(args["c"] instanceof jQuery.Event, "Argument passed to fn in jQuery(document).bind( 'ready', fn ) should be an event object");
2760
+ ok(
2761
+ noEarlyExecution,
2762
+ "Handlers bound to DOM ready should not execute before DOM ready"
2763
+ );
2764
+ deepEqual(
2765
+ order,
2766
+ ["a", "b", "d", "e", "c", "f"],
2767
+ "Bound DOM ready handlers should execute in bind-order, but those bound with jQuery(document).bind( 'ready', fn ) will always execute last"
2768
+ );
2769
+ equal(
2770
+ args["a"],
2771
+ jQuery,
2772
+ "Argument passed to fn in jQuery( fn ) should be jQuery"
2773
+ );
2774
+ equal(
2775
+ args["b"],
2776
+ jQuery,
2777
+ "Argument passed to fn in jQuery(document).ready( fn ) should be jQuery"
2778
+ );
2779
+ ok(
2780
+ args["c"] instanceof jQuery.Event,
2781
+ "Argument passed to fn in jQuery(document).bind( 'ready', fn ) should be an event object"
2782
+ );
2130
2783
  order = [];
2131
2784
  jQuery(makeHandler("g"));
2132
2785
  equal(order.pop(), "g", "Event handler should execute immediately");
2133
- equal(args["g"], jQuery, "Argument passed to fn in jQuery( fn ) should be jQuery");
2786
+ equal(
2787
+ args["g"],
2788
+ jQuery,
2789
+ "Argument passed to fn in jQuery( fn ) should be jQuery"
2790
+ );
2134
2791
  jQuery(document).ready(makeHandler("h"));
2135
2792
  equal(order.pop(), "h", "Event handler should execute immediately");
2136
- equal(args["h"], jQuery, "Argument passed to fn in jQuery(document).ready( fn ) should be jQuery");
2793
+ equal(
2794
+ args["h"],
2795
+ jQuery,
2796
+ "Argument passed to fn in jQuery(document).ready( fn ) should be jQuery"
2797
+ );
2137
2798
  jQuery(document).bind("ready.readytest", makeHandler("never"));
2138
- equal(order.length, 0, "Event handler should never execute since DOM ready has already passed");
2799
+ equal(
2800
+ order.length,
2801
+ 0,
2802
+ "Event handler should never execute since DOM ready has already passed"
2803
+ );
2139
2804
  jQuery(document).unbind("ready.readytest");
2140
2805
  });
2141
2806
  })();
2142
- test("change handler should be detached from element", function() {
2807
+ test("change handler should be detached from element", function () {
2143
2808
  expect(2);
2144
- var $fixture = jQuery("<input type='text' id='change-ie-leak' />").appendTo("body");
2809
+ var $fixture = jQuery("<input type='text' id='change-ie-leak' />").appendTo(
2810
+ "body"
2811
+ );
2145
2812
  var originRemoveEvent = jQuery.removeEvent;
2146
- var wrapperRemoveEvent = function(elem, type, handle) {
2147
- equal("change", type, "Event handler for 'change' event should be removed");
2148
- equal("change-ie-leak", jQuery(elem).attr("id"), "Event handler for 'change' event should be removed from appropriate element");
2813
+ var wrapperRemoveEvent = function (elem, type, handle) {
2814
+ equal(
2815
+ "change",
2816
+ type,
2817
+ "Event handler for 'change' event should be removed"
2818
+ );
2819
+ equal(
2820
+ "change-ie-leak",
2821
+ jQuery(elem).attr("id"),
2822
+ "Event handler for 'change' event should be removed from appropriate element"
2823
+ );
2149
2824
  originRemoveEvent(elem, type, handle);
2150
2825
  };
2151
2826
  jQuery.removeEvent = wrapperRemoveEvent;
2152
- $fixture.bind("change", function(event) {});
2827
+ $fixture.bind("change", function (event) {});
2153
2828
  $fixture.unbind("change");
2154
2829
  $fixture.remove();
2155
2830
  jQuery.removeEvent = originRemoveEvent;
2156
2831
  });
2157
- asyncTest("trigger click on checkbox, fires change event", function() {
2832
+ asyncTest("trigger click on checkbox, fires change event", function () {
2158
2833
  expect(1);
2159
2834
  var check = jQuery("#check2");
2160
- check.on("change", function() {
2161
- check.off("change");
2162
- ok(true, "Change event fired as a result of triggered click");
2163
- start();
2164
- }).trigger("click");
2835
+ check
2836
+ .on("change", function () {
2837
+ check.off("change");
2838
+ ok(true, "Change event fired as a result of triggered click");
2839
+ start();
2840
+ })
2841
+ .trigger("click");
2165
2842
  });
2166
2843
  })(require("process"));