k4compiler 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/k4compiler.gemspec +50 -0
- data/lib/k4compiler.rb +26 -0
- data/lib/k4compiler/compiler.rb +41 -0
- data/lib/k4compiler/compiler/base.rb +24 -0
- data/lib/k4compiler/compiler/closure.rb +96 -0
- data/lib/k4compiler/compiler/markdown.rb +78 -0
- data/lib/k4compiler/compiler/scss.rb +31 -0
- data/lib/k4compiler/config.rb +59 -0
- data/lib/k4compiler/version.rb +3 -0
- data/spec/k4compiler/compiler/base_spec.rb +40 -0
- data/spec/k4compiler/compiler/closure/compiled-src/hello-with-closure-compiled-script.js +18317 -0
- data/spec/k4compiler/compiler/closure/src/hello-compiled-script.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello-with-closure.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello.js +15 -0
- data/spec/k4compiler/compiler/closure_spec.rb +159 -0
- data/spec/k4compiler/compiler/markdown_spec.rb +153 -0
- data/spec/k4compiler/compiler/scss/_body.scss +5 -0
- data/spec/k4compiler/compiler/scss/sample.scss +9 -0
- data/spec/k4compiler/compiler/scss_spec.rb +70 -0
- data/spec/k4compiler/compiler_spec.rb +75 -0
- data/spec/k4compiler/config_spec.rb +116 -0
- data/spec/k4compiler_spec.rb +17 -0
- data/spec/spec_helper.rb +8 -0
- data/third_party/.gitkeep +1 -0
- data/third_party/closure-compiler-20130603/COPYING +202 -0
- data/third_party/closure-compiler-20130603/README +292 -0
- data/third_party/closure-compiler-20130603/compiler.jar +0 -0
- data/third_party/closure-library/.gitignore +12 -0
- data/third_party/closure-library/AUTHORS +17 -0
- data/third_party/closure-library/CONTRIBUTING +5 -0
- data/third_party/closure-library/LICENSE +176 -0
- data/third_party/closure-library/README +6 -0
- data/third_party/closure-library/all_tests.html +113 -0
- data/third_party/closure-library/alltests.js +16 -0
- data/third_party/closure-library/closure/bin/build/closurebuilder.py +262 -0
- data/third_party/closure-library/closure/bin/build/depstree.py +189 -0
- data/third_party/closure-library/closure/bin/build/depstree_test.py +127 -0
- data/third_party/closure-library/closure/bin/build/depswriter.py +202 -0
- data/third_party/closure-library/closure/bin/build/jscompiler.py +135 -0
- data/third_party/closure-library/closure/bin/build/jscompiler_test.py +120 -0
- data/third_party/closure-library/closure/bin/build/source.py +121 -0
- data/third_party/closure-library/closure/bin/build/source_test.py +134 -0
- data/third_party/closure-library/closure/bin/build/treescan.py +78 -0
- data/third_party/closure-library/closure/bin/calcdeps.py +590 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc.py +171 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc_test.py +167 -0
- data/third_party/closure-library/closure/bin/labs/code/run_py_tests.sh +28 -0
- data/third_party/closure-library/closure/bin/scopify.py +211 -0
- data/third_party/closure-library/closure/css/inlay/g-base.css +82 -0
- data/third_party/closure-library/closure/css/inlay/g-fixed.css +173 -0
- data/third_party/closure-library/closure/css/inlay/g-ratio.css +253 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer.js +108 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer_test.html +97 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria.js +362 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria_test.html +263 -0
- data/third_party/closure-library/closure/goog/a11y/aria/attributes.js +389 -0
- data/third_party/closure-library/closure/goog/a11y/aria/datatables.js +68 -0
- data/third_party/closure-library/closure/goog/a11y/aria/roles.js +216 -0
- data/third_party/closure-library/closure/goog/array/array.js +1507 -0
- data/third_party/closure-library/closure/goog/array/array_test.html +1674 -0
- data/third_party/closure-library/closure/goog/asserts/asserts.js +293 -0
- data/third_party/closure-library/closure/goog/asserts/asserts_test.html +178 -0
- data/third_party/closure-library/closure/goog/async/animationdelay.js +270 -0
- data/third_party/closure-library/closure/goog/async/animationdelay_test.html +93 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay.js +235 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
- data/third_party/closure-library/closure/goog/async/delay.js +177 -0
- data/third_party/closure-library/closure/goog/async/delay_test.html +148 -0
- data/third_party/closure-library/closure/goog/async/nexttick.js +174 -0
- data/third_party/closure-library/closure/goog/async/nexttick_test.html +137 -0
- data/third_party/closure-library/closure/goog/async/throttle.js +189 -0
- data/third_party/closure-library/closure/goog/async/throttle_test.html +102 -0
- data/third_party/closure-library/closure/goog/base.js +1593 -0
- data/third_party/closure-library/closure/goog/base_test.html +1206 -0
- data/third_party/closure-library/closure/goog/bootstrap/nodejs.js +91 -0
- data/third_party/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
- data/third_party/closure-library/closure/goog/color/alpha.js +467 -0
- data/third_party/closure-library/closure/goog/color/alpha_test.html +301 -0
- data/third_party/closure-library/closure/goog/color/color.js +773 -0
- data/third_party/closure-library/closure/goog/color/color_test.html +661 -0
- data/third_party/closure-library/closure/goog/color/names.js +176 -0
- data/third_party/closure-library/closure/goog/crypt/aes.js +1027 -0
- data/third_party/closure-library/closure/goog/crypt/aes_test.html +593 -0
- data/third_party/closure-library/closure/goog/crypt/arc4.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/arc4_test.html +63 -0
- data/third_party/closure-library/closure/goog/crypt/base64.js +272 -0
- data/third_party/closure-library/closure/goog/crypt/base64_test.html +117 -0
- data/third_party/closure-library/closure/goog/crypt/basen.js +242 -0
- data/third_party/closure-library/closure/goog/crypt/basen_test.html +167 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher.js +284 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher_test.html +385 -0
- data/third_party/closure-library/closure/goog/crypt/blockcipher.js +52 -0
- data/third_party/closure-library/closure/goog/crypt/cbc.js +150 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.html +18 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.js +100 -0
- data/third_party/closure-library/closure/goog/crypt/crypt.js +155 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_perf.html +85 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_test.html +98 -0
- data/third_party/closure-library/closure/goog/crypt/hash.js +62 -0
- data/third_party/closure-library/closure/goog/crypt/hash32.js +184 -0
- data/third_party/closure-library/closure/goog/crypt/hash32_test.html +287 -0
- data/third_party/closure-library/closure/goog/crypt/hashtester.js +243 -0
- data/third_party/closure-library/closure/goog/crypt/hmac.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/hmac_test.html +113 -0
- data/third_party/closure-library/closure/goog/crypt/md5.js +429 -0
- data/third_party/closure-library/closure/goog/crypt/md5_perf.html +39 -0
- data/third_party/closure-library/closure/goog/crypt/md5_test.html +152 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2.js +127 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2_test.html +68 -0
- data/third_party/closure-library/closure/goog/crypt/sha1.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_test.html +79 -0
- data/third_party/closure-library/closure/goog/crypt/sha2.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha224.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_test.html +57 -0
- data/third_party/closure-library/closure/goog/crypt/sha256.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_test.html +66 -0
- data/third_party/closure-library/closure/goog/css/autocomplete.css +43 -0
- data/third_party/closure-library/closure/goog/css/bubble.css +84 -0
- data/third_party/closure-library/closure/goog/css/button.css +38 -0
- data/third_party/closure-library/closure/goog/css/charpicker.css +206 -0
- data/third_party/closure-library/closure/goog/css/checkbox.css +38 -0
- data/third_party/closure-library/closure/goog/css/colormenubutton.css +25 -0
- data/third_party/closure-library/closure/goog/css/colorpalette.css +54 -0
- data/third_party/closure-library/closure/goog/css/colorpicker-simplegrid.css +49 -0
- data/third_party/closure-library/closure/goog/css/combobox.css +54 -0
- data/third_party/closure-library/closure/goog/css/common.css +41 -0
- data/third_party/closure-library/closure/goog/css/css3button.css +77 -0
- data/third_party/closure-library/closure/goog/css/css3menubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/custombutton.css +164 -0
- data/third_party/closure-library/closure/goog/css/datepicker.css +148 -0
- data/third_party/closure-library/closure/goog/css/dialog.css +72 -0
- data/third_party/closure-library/closure/goog/css/dimensionpicker.css +47 -0
- data/third_party/closure-library/closure/goog/css/dragdropdetector.css +48 -0
- data/third_party/closure-library/closure/goog/css/editor/bubble.css +73 -0
- data/third_party/closure-library/closure/goog/css/editor/dialog.css +66 -0
- data/third_party/closure-library/closure/goog/css/editor/equationeditor.css +113 -0
- data/third_party/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
- data/third_party/closure-library/closure/goog/css/editortoolbar.css +225 -0
- data/third_party/closure-library/closure/goog/css/filteredmenu.css +30 -0
- data/third_party/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
- data/third_party/closure-library/closure/goog/css/flatbutton.css +64 -0
- data/third_party/closure-library/closure/goog/css/flatmenubutton.css +63 -0
- data/third_party/closure-library/closure/goog/css/hovercard.css +51 -0
- data/third_party/closure-library/closure/goog/css/hsvapalette.css +231 -0
- data/third_party/closure-library/closure/goog/css/hsvpalette.css +179 -0
- data/third_party/closure-library/closure/goog/css/imagelessbutton.css +160 -0
- data/third_party/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/inputdatepicker.css +12 -0
- data/third_party/closure-library/closure/goog/css/linkbutton.css +26 -0
- data/third_party/closure-library/closure/goog/css/menu.css +27 -0
- data/third_party/closure-library/closure/goog/css/menubar.css +57 -0
- data/third_party/closure-library/closure/goog/css/menubutton.css +169 -0
- data/third_party/closure-library/closure/goog/css/menuitem.css +148 -0
- data/third_party/closure-library/closure/goog/css/menuseparator.css +19 -0
- data/third_party/closure-library/closure/goog/css/multitestrunner.css +121 -0
- data/third_party/closure-library/closure/goog/css/offline.css +147 -0
- data/third_party/closure-library/closure/goog/css/palette.css +36 -0
- data/third_party/closure-library/closure/goog/css/popupdatepicker.css +17 -0
- data/third_party/closure-library/closure/goog/css/roundedpanel.css +29 -0
- data/third_party/closure-library/closure/goog/css/roundedtab.css +158 -0
- data/third_party/closure-library/closure/goog/css/submenu.css +38 -0
- data/third_party/closure-library/closure/goog/css/tab.css +105 -0
- data/third_party/closure-library/closure/goog/css/tabbar.css +52 -0
- data/third_party/closure-library/closure/goog/css/tablesorter.css +14 -0
- data/third_party/closure-library/closure/goog/css/toolbar.css +400 -0
- data/third_party/closure-library/closure/goog/css/tooltip.css +14 -0
- data/third_party/closure-library/closure/goog/css/tree.css +146 -0
- data/third_party/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
- data/third_party/closure-library/closure/goog/cssom/cssom.js +449 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test.html +343 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style.js +1023 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
- data/third_party/closure-library/closure/goog/datasource/datamanager.js +559 -0
- data/third_party/closure-library/closure/goog/datasource/datasource.js +656 -0
- data/third_party/closure-library/closure/goog/datasource/datasource_test.html +265 -0
- data/third_party/closure-library/closure/goog/datasource/expr.js +544 -0
- data/third_party/closure-library/closure/goog/datasource/expr_test.html +97 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode.js +811 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
- data/third_party/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
- data/third_party/closure-library/closure/goog/datasource/jsondatasource.js +148 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +195 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
- data/third_party/closure-library/closure/goog/datasource/xmldatasource.js +415 -0
- data/third_party/closure-library/closure/goog/date/date.js +1718 -0
- data/third_party/closure-library/closure/goog/date/date_test.html +1392 -0
- data/third_party/closure-library/closure/goog/date/datelike.js +27 -0
- data/third_party/closure-library/closure/goog/date/daterange.js +413 -0
- data/third_party/closure-library/closure/goog/date/daterange_test.html +253 -0
- data/third_party/closure-library/closure/goog/date/relative.js +465 -0
- data/third_party/closure-library/closure/goog/date/relative_test.html +267 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime.js +179 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime_test.html +124 -0
- data/third_party/closure-library/closure/goog/db/cursor.js +214 -0
- data/third_party/closure-library/closure/goog/db/db.js +182 -0
- data/third_party/closure-library/closure/goog/db/db_test.html +1657 -0
- data/third_party/closure-library/closure/goog/db/error.js +359 -0
- data/third_party/closure-library/closure/goog/db/index.js +245 -0
- data/third_party/closure-library/closure/goog/db/indexeddb.js +337 -0
- data/third_party/closure-library/closure/goog/db/keyrange.js +117 -0
- data/third_party/closure-library/closure/goog/db/objectstore.js +399 -0
- data/third_party/closure-library/closure/goog/db/old_db_test.html +1244 -0
- data/third_party/closure-library/closure/goog/db/transaction.js +218 -0
- data/third_party/closure-library/closure/goog/debug/console.js +207 -0
- data/third_party/closure-library/closure/goog/debug/console_test.html +195 -0
- data/third_party/closure-library/closure/goog/debug/debug.js +501 -0
- data/third_party/closure-library/closure/goog/debug/debug_test.html +68 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow.js +615 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow_test.html +29 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss.js +444 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
- data/third_party/closure-library/closure/goog/debug/divconsole.js +141 -0
- data/third_party/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry.js +158 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry_test.html +87 -0
- data/third_party/closure-library/closure/goog/debug/error.js +51 -0
- data/third_party/closure-library/closure/goog/debug/error_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler.js +363 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_test.html +292 -0
- data/third_party/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter.js +376 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter_test.html +351 -0
- data/third_party/closure-library/closure/goog/debug/fancywindow.js +362 -0
- data/third_party/closure-library/closure/goog/debug/formatter.js +316 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay.js +162 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay_test.html +53 -0
- data/third_party/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer.js +147 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/debug/logger.js +853 -0
- data/third_party/closure-library/closure/goog/debug/logger_test.html +208 -0
- data/third_party/closure-library/closure/goog/debug/logrecord.js +271 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer.js +121 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer_test.html +96 -0
- data/third_party/closure-library/closure/goog/debug/reflect.js +178 -0
- data/third_party/closure-library/closure/goog/debug/reflect_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
- data/third_party/closure-library/closure/goog/debug/tracer.js +724 -0
- data/third_party/closure-library/closure/goog/debug/tracer_test.html +57 -0
- data/third_party/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
- data/third_party/closure-library/closure/goog/demos/animationqueue.html +149 -0
- data/third_party/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
- data/third_party/closure-library/closure/goog/demos/bidiinput.html +72 -0
- data/third_party/closure-library/closure/goog/demos/blobhasher.html +61 -0
- data/third_party/closure-library/closure/goog/demos/bubble.html +250 -0
- data/third_party/closure-library/closure/goog/demos/button.html +395 -0
- data/third_party/closure-library/closure/goog/demos/charcounter.html +57 -0
- data/third_party/closure-library/closure/goog/demos/charpicker.html +66 -0
- data/third_party/closure-library/closure/goog/demos/checkbox.html +122 -0
- data/third_party/closure-library/closure/goog/demos/color-contrast.html +60 -0
- data/third_party/closure-library/closure/goog/demos/colormenubutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/colorpicker.html +43 -0
- data/third_party/closure-library/closure/goog/demos/combobox.html +160 -0
- data/third_party/closure-library/closure/goog/demos/container.html +670 -0
- data/third_party/closure-library/closure/goog/demos/control.html +477 -0
- data/third_party/closure-library/closure/goog/demos/css/demo.css +75 -0
- data/third_party/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
- data/third_party/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
- data/third_party/closure-library/closure/goog/demos/css3button.html +166 -0
- data/third_party/closure-library/closure/goog/demos/css3menubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
- data/third_party/closure-library/closure/goog/demos/datepicker.html +183 -0
- data/third_party/closure-library/closure/goog/demos/debug.html +118 -0
- data/third_party/closure-library/closure/goog/demos/depsgraph.html +220 -0
- data/third_party/closure-library/closure/goog/demos/dialog.html +156 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
- data/third_party/closure-library/closure/goog/demos/dom_selection.html +88 -0
- data/third_party/closure-library/closure/goog/demos/drag.html +191 -0
- data/third_party/closure-library/closure/goog/demos/dragdrop.html +263 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
- data/third_party/closure-library/closure/goog/demos/dragger.html +83 -0
- data/third_party/closure-library/closure/goog/demos/draglistgroup.html +273 -0
- data/third_party/closure-library/closure/goog/demos/dragscrollsupport.html +133 -0
- data/third_party/closure-library/closure/goog/demos/drilldownrow.html +78 -0
- data/third_party/closure-library/closure/goog/demos/editor/deps.js +21 -0
- data/third_party/closure-library/closure/goog/demos/editor/editor.html +139 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.html +36 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.js +40 -0
- data/third_party/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog.js +171 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +116 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
- data/third_party/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
- data/third_party/closure-library/closure/goog/demos/editor/tableeditor.html +93 -0
- data/third_party/closure-library/closure/goog/demos/effects.html +162 -0
- data/third_party/closure-library/closure/goog/demos/emoji/200.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/201.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/202.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/203.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/204.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/205.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/206.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/none.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/event-propagation.html +192 -0
- data/third_party/closure-library/closure/goog/demos/events.html +99 -0
- data/third_party/closure-library/closure/goog/demos/eventtarget.html +70 -0
- data/third_party/closure-library/closure/goog/demos/filedrophandler.html +65 -0
- data/third_party/closure-library/closure/goog/demos/filteredmenu.html +118 -0
- data/third_party/closure-library/closure/goog/demos/focushandler.html +58 -0
- data/third_party/closure-library/closure/goog/demos/fpsdisplay.html +50 -0
- data/third_party/closure-library/closure/goog/demos/fx/css3/transition.html +222 -0
- data/third_party/closure-library/closure/goog/demos/gauge.html +158 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
- data/third_party/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
- data/third_party/closure-library/closure/goog/demos/graphics/events.html +114 -0
- data/third_party/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
- data/third_party/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tigerdata.js +2841 -0
- data/third_party/closure-library/closure/goog/demos/history1.html +132 -0
- data/third_party/closure-library/closure/goog/demos/history2.html +119 -0
- data/third_party/closure-library/closure/goog/demos/history3.html +116 -0
- data/third_party/closure-library/closure/goog/demos/history3js.html +48 -0
- data/third_party/closure-library/closure/goog/demos/history_blank.html +26 -0
- data/third_party/closure-library/closure/goog/demos/hovercard.html +177 -0
- data/third_party/closure-library/closure/goog/demos/hsvapalette.html +55 -0
- data/third_party/closure-library/closure/goog/demos/hsvpalette.html +56 -0
- data/third_party/closure-library/closure/goog/demos/html5history.html +87 -0
- data/third_party/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/index.html +20 -0
- data/third_party/closure-library/closure/goog/demos/index_nav.html +255 -0
- data/third_party/closure-library/closure/goog/demos/index_splash.html +27 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
- data/third_party/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
- data/third_party/closure-library/closure/goog/demos/inputhandler.html +88 -0
- data/third_party/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
- data/third_party/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
- data/third_party/closure-library/closure/goog/demos/keyhandler.html +118 -0
- data/third_party/closure-library/closure/goog/demos/labelinput.html +42 -0
- data/third_party/closure-library/closure/goog/demos/menu.html +220 -0
- data/third_party/closure-library/closure/goog/demos/menubar.html +211 -0
- data/third_party/closure-library/closure/goog/demos/menubutton.html +380 -0
- data/third_party/closure-library/closure/goog/demos/menubutton_frame.html +27 -0
- data/third_party/closure-library/closure/goog/demos/menuitem.html +164 -0
- data/third_party/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
- data/third_party/closure-library/closure/goog/demos/offline.html +268 -0
- data/third_party/closure-library/closure/goog/demos/onlinehandler.html +79 -0
- data/third_party/closure-library/closure/goog/demos/palette.html +302 -0
- data/third_party/closure-library/closure/goog/demos/pastehandler.html +54 -0
- data/third_party/closure-library/closure/goog/demos/pixeldensitymonitor.html +51 -0
- data/third_party/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
- data/third_party/closure-library/closure/goog/demos/popup.html +206 -0
- data/third_party/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
- data/third_party/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
- data/third_party/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
- data/third_party/closure-library/closure/goog/demos/popupmenu.html +116 -0
- data/third_party/closure-library/closure/goog/demos/progressbar.html +97 -0
- data/third_party/closure-library/closure/goog/demos/prompt.html +92 -0
- data/third_party/closure-library/closure/goog/demos/quadtree.html +107 -0
- data/third_party/closure-library/closure/goog/demos/ratings.html +121 -0
- data/third_party/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
- data/third_party/closure-library/closure/goog/demos/roundedpanel.html +139 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.html +75 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.js +197 -0
- data/third_party/closure-library/closure/goog/demos/scrollfloater.html +113 -0
- data/third_party/closure-library/closure/goog/demos/select.html +324 -0
- data/third_party/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
- data/third_party/closure-library/closure/goog/demos/serverchart.html +122 -0
- data/third_party/closure-library/closure/goog/demos/slider.html +128 -0
- data/third_party/closure-library/closure/goog/demos/splitbehavior.html +163 -0
- data/third_party/closure-library/closure/goog/demos/splitpane.html +243 -0
- data/third_party/closure-library/closure/goog/demos/stopevent.html +171 -0
- data/third_party/closure-library/closure/goog/demos/submenus.html +130 -0
- data/third_party/closure-library/closure/goog/demos/submenus2.html +150 -0
- data/third_party/closure-library/closure/goog/demos/tabbar.html +289 -0
- data/third_party/closure-library/closure/goog/demos/tablesorter.html +116 -0
- data/third_party/closure-library/closure/goog/demos/tabpane.html +302 -0
- data/third_party/closure-library/closure/goog/demos/textarea.html +128 -0
- data/third_party/closure-library/closure/goog/demos/timers.html +291 -0
- data/third_party/closure-library/closure/goog/demos/toolbar.html +703 -0
- data/third_party/closure-library/closure/goog/demos/tooltip.html +91 -0
- data/third_party/closure-library/closure/goog/demos/tracer.html +92 -0
- data/third_party/closure-library/closure/goog/demos/tree/demo.html +126 -0
- data/third_party/closure-library/closure/goog/demos/tree/testdata.js +260 -0
- data/third_party/closure-library/closure/goog/demos/tweakui.html +121 -0
- data/third_party/closure-library/closure/goog/demos/twothumbslider.html +121 -0
- data/third_party/closure-library/closure/goog/demos/useragent.html +214 -0
- data/third_party/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
- data/third_party/closure-library/closure/goog/demos/xpc/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/index.html +89 -0
- data/third_party/closure-library/closure/goog/demos/xpc/inner.html +58 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/relay.html +16 -0
- data/third_party/closure-library/closure/goog/demos/xpc/xpcdemo.js +307 -0
- data/third_party/closure-library/closure/goog/demos/zippy.html +149 -0
- data/third_party/closure-library/closure/goog/deps.js +911 -0
- data/third_party/closure-library/closure/goog/disposable/disposable.js +294 -0
- data/third_party/closure-library/closure/goog/disposable/disposable_test.html +307 -0
- data/third_party/closure-library/closure/goog/disposable/idisposable.js +45 -0
- data/third_party/closure-library/closure/goog/dom/a11y.js +169 -0
- data/third_party/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange.js +528 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
- data/third_party/closure-library/closure/goog/dom/annotate.js +355 -0
- data/third_party/closure-library/closure/goog/dom/annotate_test.html +215 -0
- data/third_party/closure-library/closure/goog/dom/browserfeature.js +67 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/abstractrange.js +352 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange.js +150 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange_test.html +638 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/geckorange.js +86 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/ierange.js +952 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/w3crange.js +365 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor.js +202 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.js +130 -0
- data/third_party/closure-library/closure/goog/dom/classes.js +227 -0
- data/third_party/closure-library/closure/goog/dom/classes_quirks_test.html +63 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.html +64 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.js +231 -0
- data/third_party/closure-library/closure/goog/dom/classlist.js +271 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.html +26 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.js +244 -0
- data/third_party/closure-library/closure/goog/dom/controlrange.js +505 -0
- data/third_party/closure-library/closure/goog/dom/controlrange_test.html +246 -0
- data/third_party/closure-library/closure/goog/dom/dataset.js +135 -0
- data/third_party/closure-library/closure/goog/dom/dataset_test.html +117 -0
- data/third_party/closure-library/closure/goog/dom/dom.js +2700 -0
- data/third_party/closure-library/closure/goog/dom/dom_quirks_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.js +1421 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor_test.html +284 -0
- data/third_party/closure-library/closure/goog/dom/forms.js +414 -0
- data/third_party/closure-library/closure/goog/dom/forms_test.html +501 -0
- data/third_party/closure-library/closure/goog/dom/fullscreen.js +124 -0
- data/third_party/closure-library/closure/goog/dom/iframe.js +163 -0
- data/third_party/closure-library/closure/goog/dom/iframe_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/iter.js +127 -0
- data/third_party/closure-library/closure/goog/dom/iter_test.html +97 -0
- data/third_party/closure-library/closure/goog/dom/multirange.js +519 -0
- data/third_party/closure-library/closure/goog/dom/multirange_test.html +67 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator.js +86 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset.js +112 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
- data/third_party/closure-library/closure/goog/dom/pattern/allchildren.js +75 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
- data/third_party/closure-library/closure/goog/dom/pattern/childmatches.js +154 -0
- data/third_party/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/fulltag.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
- data/third_party/closure-library/closure/goog/dom/pattern/nodetype.js +58 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
- data/third_party/closure-library/closure/goog/dom/pattern/repeat.js +190 -0
- data/third_party/closure-library/closure/goog/dom/pattern/sequence.js +141 -0
- data/third_party/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/tag.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/text.js +70 -0
- data/third_party/closure-library/closure/goog/dom/range.js +226 -0
- data/third_party/closure-library/closure/goog/dom/range_test.html +735 -0
- data/third_party/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange.js +215 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange_test.html +257 -0
- data/third_party/closure-library/closure/goog/dom/savedrange.js +74 -0
- data/third_party/closure-library/closure/goog/dom/savedrange_test.html +61 -0
- data/third_party/closure-library/closure/goog/dom/selection.js +470 -0
- data/third_party/closure-library/closure/goog/dom/selection_test.html +329 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator.js +367 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
- data/third_party/closure-library/closure/goog/dom/tagname.js +159 -0
- data/third_party/closure-library/closure/goog/dom/tagname_test.html +37 -0
- data/third_party/closure-library/closure/goog/dom/textrange.js +630 -0
- data/third_party/closure-library/closure/goog/dom/textrange_test.html +342 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator.js +244 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
- data/third_party/closure-library/closure/goog/dom/vendor.js +62 -0
- data/third_party/closure-library/closure/goog/dom/vendor_test.html +202 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor.js +180 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor_test.html +138 -0
- data/third_party/closure-library/closure/goog/dom/xml.js +204 -0
- data/third_party/closure-library/closure/goog/dom/xml_test.html +103 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature.js +273 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper.js +435 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
- data/third_party/closure-library/closure/goog/editor/command.js +76 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield.js +110 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield_test.html +62 -0
- data/third_party/closure-library/closure/goog/editor/defines.js +34 -0
- data/third_party/closure-library/closure/goog/editor/field.js +2725 -0
- data/third_party/closure-library/closure/goog/editor/field_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/field_test.js +1278 -0
- data/third_party/closure-library/closure/goog/editor/focus.js +32 -0
- data/third_party/closure-library/closure/goog/editor/focus_test.html +66 -0
- data/third_party/closure-library/closure/goog/editor/icontent.js +296 -0
- data/third_party/closure-library/closure/goog/editor/icontent_test.html +232 -0
- data/third_party/closure-library/closure/goog/editor/link.js +359 -0
- data/third_party/closure-library/closure/goog/editor/link_test.html +252 -0
- data/third_party/closure-library/closure/goog/editor/node.js +483 -0
- data/third_party/closure-library/closure/goog/editor/node_test.html +631 -0
- data/third_party/closure-library/closure/goog/editor/plugin.js +463 -0
- data/third_party/closure-library/closure/goog/editor/plugin_test.html +187 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +630 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +313 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +334 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +404 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter.js +1750 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote.js +479 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote_test.html +212 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons.js +88 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons_test.html +92 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler.js +767 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler_test.html +754 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorbubble.js +153 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin.js +215 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin_test.html +120 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong.js +326 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong_test.html +411 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble.js +562 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble_test.html +375 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +437 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +740 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin.js +63 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin_test.html +70 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum.js +188 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting.js +779 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting_test.html +961 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor.js +472 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +742 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +549 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo.js +1015 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate.js +86 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
- data/third_party/closure-library/closure/goog/editor/range.js +632 -0
- data/third_party/closure-library/closure/goog/editor/range_test.html +1004 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield.js +738 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +28 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.js +472 -0
- data/third_party/closure-library/closure/goog/editor/style.js +222 -0
- data/third_party/closure-library/closure/goog/editor/style_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/table.js +567 -0
- data/third_party/closure-library/closure/goog/editor/table_test.html +529 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper.js +136 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper_test.html +211 -0
- data/third_party/closure-library/closure/goog/events/actionhandler.js +181 -0
- data/third_party/closure-library/closure/goog/events/actionhandler_test.html +82 -0
- data/third_party/closure-library/closure/goog/events/browserevent.js +411 -0
- data/third_party/closure-library/closure/goog/events/browserevent_test.html +161 -0
- data/third_party/closure-library/closure/goog/events/browserfeature.js +85 -0
- data/third_party/closure-library/closure/goog/events/event.js +154 -0
- data/third_party/closure-library/closure/goog/events/event_test.html +66 -0
- data/third_party/closure-library/closure/goog/events/eventhandler.js +291 -0
- data/third_party/closure-library/closure/goog/events/eventhandler_test.html +254 -0
- data/third_party/closure-library/closure/goog/events/events.js +1095 -0
- data/third_party/closure-library/closure/goog/events/events_test.html +659 -0
- data/third_party/closure-library/closure/goog/events/eventtarget.js +401 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_test.html +70 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_googevents_test.html +85 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_w3cinterface_test.html +49 -0
- data/third_party/closure-library/closure/goog/events/eventtargettester.js +1028 -0
- data/third_party/closure-library/closure/goog/events/eventtype.js +165 -0
- data/third_party/closure-library/closure/goog/events/eventwrapper.js +66 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler.js +221 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
- data/third_party/closure-library/closure/goog/events/focushandler.js +106 -0
- data/third_party/closure-library/closure/goog/events/imehandler.js +363 -0
- data/third_party/closure-library/closure/goog/events/imehandler_test.html +269 -0
- data/third_party/closure-library/closure/goog/events/inputhandler.js +213 -0
- data/third_party/closure-library/closure/goog/events/keycodes.js +377 -0
- data/third_party/closure-library/closure/goog/events/keycodes_test.html +125 -0
- data/third_party/closure-library/closure/goog/events/keyhandler.js +556 -0
- data/third_party/closure-library/closure/goog/events/keyhandler_test.html +727 -0
- data/third_party/closure-library/closure/goog/events/keynames.js +132 -0
- data/third_party/closure-library/closure/goog/events/listenable.js +323 -0
- data/third_party/closure-library/closure/goog/events/listenable_test.html +31 -0
- data/third_party/closure-library/closure/goog/events/listener.js +131 -0
- data/third_party/closure-library/closure/goog/events/listenermap.js +299 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.html +19 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.js +116 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler.js +295 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler_test.html +385 -0
- data/third_party/closure-library/closure/goog/events/onlinehandler.js +162 -0
- data/third_party/closure-library/closure/goog/events/onlinelistener_test.html +160 -0
- data/third_party/closure-library/closure/goog/events/pastehandler.js +515 -0
- data/third_party/closure-library/closure/goog/events/pastehandler_test.html +414 -0
- data/third_party/closure-library/closure/goog/format/emailaddress.js +332 -0
- data/third_party/closure-library/closure/goog/format/emailaddress_test.html +192 -0
- data/third_party/closure-library/closure/goog/format/format.js +491 -0
- data/third_party/closure-library/closure/goog/format/format_test.html +302 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter.js +407 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter.js +413 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
- data/third_party/closure-library/closure/goog/fs/entry.js +272 -0
- data/third_party/closure-library/closure/goog/fs/entryimpl.js +399 -0
- data/third_party/closure-library/closure/goog/fs/error.js +102 -0
- data/third_party/closure-library/closure/goog/fs/filereader.js +288 -0
- data/third_party/closure-library/closure/goog/fs/filesaver.js +176 -0
- data/third_party/closure-library/closure/goog/fs/filesystem.js +41 -0
- data/third_party/closure-library/closure/goog/fs/filesystemimpl.js +64 -0
- data/third_party/closure-library/closure/goog/fs/filewriter.js +110 -0
- data/third_party/closure-library/closure/goog/fs/fs.js +253 -0
- data/third_party/closure-library/closure/goog/fs/fs_test.html +754 -0
- data/third_party/closure-library/closure/goog/fs/progressevent.js +68 -0
- data/third_party/closure-library/closure/goog/functions/functions.js +255 -0
- data/third_party/closure-library/closure/goog/functions/functions_test.html +223 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop.js +1517 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop_test.html +663 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim.js +210 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim_test.html +225 -0
- data/third_party/closure-library/closure/goog/fx/animation.js +530 -0
- data/third_party/closure-library/closure/goog/fx/animation_test.html +117 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue.js +307 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue_test.html +316 -0
- data/third_party/closure-library/closure/goog/fx/css3/fx.js +62 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition.js +196 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition_test.html +224 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation.js +113 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation_test.html +126 -0
- data/third_party/closure-library/closure/goog/fx/dom.js +653 -0
- data/third_party/closure-library/closure/goog/fx/dragdrop.js +50 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup.js +109 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
- data/third_party/closure-library/closure/goog/fx/dragger.js +795 -0
- data/third_party/closure-library/closure/goog/fx/dragger_test.html +449 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup.js +1301 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup_test.html +403 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport.js +299 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport_test.html +354 -0
- data/third_party/closure-library/closure/goog/fx/easing.js +50 -0
- data/third_party/closure-library/closure/goog/fx/fx.js +32 -0
- data/third_party/closure-library/closure/goog/fx/fx_test.html +100 -0
- data/third_party/closure-library/closure/goog/fx/transition.js +75 -0
- data/third_party/closure-library/closure/goog/fx/transitionbase.js +237 -0
- data/third_party/closure-library/closure/goog/gears/basestore.js +521 -0
- data/third_party/closure-library/closure/goog/gears/basestore_test.html +247 -0
- data/third_party/closure-library/closure/goog/gears/database.js +934 -0
- data/third_party/closure-library/closure/goog/gears/database_test.html +699 -0
- data/third_party/closure-library/closure/goog/gears/gears.js +228 -0
- data/third_party/closure-library/closure/goog/gears/gears_test.html +78 -0
- data/third_party/closure-library/closure/goog/gears/httprequest.js +80 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient.js +130 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient_test.html +172 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver.js +157 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver_test.html +119 -0
- data/third_party/closure-library/closure/goog/gears/logstore.js +478 -0
- data/third_party/closure-library/closure/goog/gears/logstore_test.html +600 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore.js +555 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata.js +204 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata_test.html +221 -0
- data/third_party/closure-library/closure/goog/gears/statustype.js +37 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture.js +370 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
- data/third_party/closure-library/closure/goog/gears/worker.js +200 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel.js +205 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
- data/third_party/closure-library/closure/goog/gears/workerpool.js +240 -0
- data/third_party/closure-library/closure/goog/gears/workerpool_test.html +204 -0
- data/third_party/closure-library/closure/goog/graphics/abstractgraphics.js +441 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform.js +587 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform_test.html +360 -0
- data/third_party/closure-library/closure/goog/graphics/canvaselement.js +792 -0
- data/third_party/closure-library/closure/goog/graphics/canvasgraphics.js +665 -0
- data/third_party/closure-library/closure/goog/graphics/element.js +151 -0
- data/third_party/closure-library/closure/goog/graphics/ellipseelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates.js +159 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element.js +968 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ellipse.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ext.js +29 -0
- data/third_party/closure-library/closure/goog/graphics/ext/graphics.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/group.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/image.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path.js +142 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
- data/third_party/closure-library/closure/goog/graphics/ext/rectangle.js +54 -0
- data/third_party/closure-library/closure/goog/graphics/ext/shape.js +146 -0
- data/third_party/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/fill.js +46 -0
- data/third_party/closure-library/closure/goog/graphics/font.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/graphics.js +135 -0
- data/third_party/closure-library/closure/goog/graphics/groupelement.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/imageelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/lineargradient.js +174 -0
- data/third_party/closure-library/closure/goog/graphics/path.js +512 -0
- data/third_party/closure-library/closure/goog/graphics/path_test.html +359 -0
- data/third_party/closure-library/closure/goog/graphics/pathelement.js +55 -0
- data/third_party/closure-library/closure/goog/graphics/paths.js +86 -0
- data/third_party/closure-library/closure/goog/graphics/paths_test.html +98 -0
- data/third_party/closure-library/closure/goog/graphics/rectelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill.js +74 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill_test.html +53 -0
- data/third_party/closure-library/closure/goog/graphics/stroke.js +67 -0
- data/third_party/closure-library/closure/goog/graphics/strokeandfillelement.js +115 -0
- data/third_party/closure-library/closure/goog/graphics/svgelement.js +279 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics.js +857 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics_test.html +83 -0
- data/third_party/closure-library/closure/goog/graphics/textelement.js +56 -0
- data/third_party/closure-library/closure/goog/graphics/vmlelement.js +433 -0
- data/third_party/closure-library/closure/goog/graphics/vmlgraphics.js +893 -0
- data/third_party/closure-library/closure/goog/history/event.js +54 -0
- data/third_party/closure-library/closure/goog/history/eventtype.js +30 -0
- data/third_party/closure-library/closure/goog/history/history.js +998 -0
- data/third_party/closure-library/closure/goog/history/history_test.html +19 -0
- data/third_party/closure-library/closure/goog/history/history_test.js +54 -0
- data/third_party/closure-library/closure/goog/history/html5history.js +303 -0
- data/third_party/closure-library/closure/goog/history/html5history_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/bidi.js +806 -0
- data/third_party/closure-library/closure/goog/i18n/bidi_test.html +425 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter.js +490 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
- data/third_party/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
- data/third_party/closure-library/closure/goog/i18n/collation.js +58 -0
- data/third_party/closure-library/closure/goog/i18n/collation_test.html +63 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols.js +7973 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols_ext.js +27549 -0
- data/third_party/closure-library/closure/goog/i18n/currency.js +424 -0
- data/third_party/closure-library/closure/goog/i18n/currency_test.html +204 -0
- data/third_party/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat.js +673 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat_test.html +532 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse.js +1129 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse_test.html +766 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatterns.js +1854 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatternsext.js +10947 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbols.js +3713 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbolsext.js +21152 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak.js +214 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak_test.html +80 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat.js +771 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat_test.html +471 -0
- data/third_party/closure-library/closure/goog/i18n/mime.js +111 -0
- data/third_party/closure-library/closure/goog/i18n/mime_test.html +51 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat.js +1228 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat_test.html +985 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbols.js +3416 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbolsext.js +11887 -0
- data/third_party/closure-library/closure/goog/i18n/ordinalrules.js +589 -0
- data/third_party/closure-library/closure/goog/i18n/pluralrules.js +859 -0
- data/third_party/closure-library/closure/goog/i18n/timezone.js +340 -0
- data/third_party/closure-library/closure/goog/i18n/timezone_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/uchar.js +1368 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher.js +73 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher_test.html +62 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/namefetcher.js +70 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher.js +281 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher_test.html +111 -0
- data/third_party/closure-library/closure/goog/i18n/uchar_test.html +133 -0
- data/third_party/closure-library/closure/goog/images/blank.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_close.jpg +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_left.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_right.gif +0 -0
- data/third_party/closure-library/closure/goog/images/button-bg.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-outline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check.gif +0 -0
- data/third_party/closure-library/closure/goog/images/close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdown.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_offline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_online.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_paused.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_syncing.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/menu-arrows.gif +0 -0
- data/third_party/closure-library/closure/goog/images/minus.png +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/offlineicons.png +0 -0
- data/third_party/closure-library/closure/goog/images/plus.png +0 -0
- data/third_party/closure-library/closure/goog/images/ratingstars.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-bg.png +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/I.png +0 -0
- data/third_party/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.png +0 -0
- data/third_party/closure-library/closure/goog/images/ui_controls.jpg +0 -0
- data/third_party/closure-library/closure/goog/iter/iter.js +702 -0
- data/third_party/closure-library/closure/goog/iter/iter_test.html +479 -0
- data/third_party/closure-library/closure/goog/json/evaljsonprocessor.js +66 -0
- data/third_party/closure-library/closure/goog/json/json.js +349 -0
- data/third_party/closure-library/closure/goog/json/json_perf.html +116 -0
- data/third_party/closure-library/closure/goog/json/json_test.html +569 -0
- data/third_party/closure-library/closure/goog/json/nativejsonprocessor.js +73 -0
- data/third_party/closure-library/closure/goog/json/processor.js +33 -0
- data/third_party/closure-library/closure/goog/json/processor_test.html +89 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef.js +162 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef_test.html +103 -0
- data/third_party/closure-library/closure/goog/labs/events/touch.js +82 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.html +19 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.js +96 -0
- data/third_party/closure-library/closure/goog/labs/format/csv.js +391 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.html +20 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.js +169 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock.js +733 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock_test.html +416 -0
- data/third_party/closure-library/closure/goog/labs/net/image.js +93 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.js +128 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_json.data +2 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_text.data +1 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel.js +188 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/basetestchannel.js +639 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/channel.js +195 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/requeststats.js +391 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase.js +2171 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.js +1400 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport.js +274 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport_test.html +228 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchanneldebug.js +298 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest.js +1291 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest_test.html +287 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransport.js +74 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransportfactory.js +35 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr.js +449 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr_test.html +455 -0
- data/third_party/closure-library/closure/goog/labs/object/object.js +46 -0
- data/third_party/closure-library/closure/goog/labs/object/object_test.html +56 -0
- data/third_party/closure-library/closure/goog/labs/observe/notice.js +63 -0
- data/third_party/closure-library/closure/goog/labs/observe/observable.js +77 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset.js +180 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset_test.html +207 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset.js +156 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset_test.html +252 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer.js +100 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer_test.html +65 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable.js +129 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable_test.html +196 -0
- data/third_party/closure-library/closure/goog/labs/structs/map.js +339 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_perf.js +201 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_test.html +434 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap.js +279 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap_test.html +332 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor.js +178 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.js +146 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat.js +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat_test.html +73 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher.js +94 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher_test.html +43 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher.js +266 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher_test.html +70 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher.js +206 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher_test.html +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/matcher.js +51 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher.js +334 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher_test.html +79 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher.js +306 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher_test.html +102 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher.js +402 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher_test.html +101 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser.js +189 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device.js +64 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.js +88 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine.js +144 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.js +164 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.js +256 -0
- data/third_party/closure-library/closure/goog/labs/useragent/test_agents.js +272 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util.js +89 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.js +60 -0
- data/third_party/closure-library/closure/goog/locale/countries.js +291 -0
- data/third_party/closure-library/closure/goog/locale/countrylanguagenames_test.html +237 -0
- data/third_party/closure-library/closure/goog/locale/defaultlocalenameconstants.js +907 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames.js +73 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnamesdata.js +327 -0
- data/third_party/closure-library/closure/goog/locale/locale.js +403 -0
- data/third_party/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
- data/third_party/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection.js +117 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
- data/third_party/closure-library/closure/goog/locale/timezonefingerprint.js +248 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist.js +131 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
- data/third_party/closure-library/closure/goog/log/log.js +183 -0
- data/third_party/closure-library/closure/goog/log/log_test.js +169 -0
- data/third_party/closure-library/closure/goog/math/bezier.js +311 -0
- data/third_party/closure-library/closure/goog/math/bezier_test.html +112 -0
- data/third_party/closure-library/closure/goog/math/box.js +369 -0
- data/third_party/closure-library/closure/goog/math/box_test.html +298 -0
- data/third_party/closure-library/closure/goog/math/coordinate.js +233 -0
- data/third_party/closure-library/closure/goog/math/coordinate3.js +169 -0
- data/third_party/closure-library/closure/goog/math/coordinate3_test.html +204 -0
- data/third_party/closure-library/closure/goog/math/coordinate_test.html +159 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff.js +103 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff_test.html +67 -0
- data/third_party/closure-library/closure/goog/math/integer.js +737 -0
- data/third_party/closure-library/closure/goog/math/integer_test.html +1653 -0
- data/third_party/closure-library/closure/goog/math/interpolator/interpolator1.js +64 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1.js +82 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1_test.html +87 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1.js +81 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1_test.html +74 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1.js +202 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/line.js +177 -0
- data/third_party/closure-library/closure/goog/math/line_test.html +62 -0
- data/third_party/closure-library/closure/goog/math/long.js +802 -0
- data/third_party/closure-library/closure/goog/math/long_test.html +1571 -0
- data/third_party/closure-library/closure/goog/math/math.js +387 -0
- data/third_party/closure-library/closure/goog/math/math_test.html +292 -0
- data/third_party/closure-library/closure/goog/math/matrix.js +675 -0
- data/third_party/closure-library/closure/goog/math/matrix_test.html +434 -0
- data/third_party/closure-library/closure/goog/math/range.js +144 -0
- data/third_party/closure-library/closure/goog/math/range_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/rangeset.js +394 -0
- data/third_party/closure-library/closure/goog/math/rangeset_test.html +664 -0
- data/third_party/closure-library/closure/goog/math/rect.js +463 -0
- data/third_party/closure-library/closure/goog/math/rect_test.html +444 -0
- data/third_party/closure-library/closure/goog/math/size.js +206 -0
- data/third_party/closure-library/closure/goog/math/size_test.html +180 -0
- data/third_party/closure-library/closure/goog/math/tdma.js +73 -0
- data/third_party/closure-library/closure/goog/math/tdma_test.html +33 -0
- data/third_party/closure-library/closure/goog/math/vec2.js +283 -0
- data/third_party/closure-library/closure/goog/math/vec2_test.html +225 -0
- data/third_party/closure-library/closure/goog/math/vec3.js +308 -0
- data/third_party/closure-library/closure/goog/math/vec3_test.html +221 -0
- data/third_party/closure-library/closure/goog/memoize/memoize.js +102 -0
- data/third_party/closure-library/closure/goog/memoize/memoize_test.html +157 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel.js +210 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel_test.html +89 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel.js +287 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel_test.html +283 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel_test.html +113 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient.js +131 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
- data/third_party/closure-library/closure/goog/messaging/messagechannel.js +116 -0
- data/third_party/closure-library/closure/goog/messaging/messaging.js +34 -0
- data/third_party/closure-library/closure/goog/messaging/messaging_test.html +42 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel.js +302 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller.js +151 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller_test.html +65 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel.js +401 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel_test.html +392 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork.js +78 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork_test.html +74 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator.js +197 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator_test.html +112 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel.js +236 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel_test.html +161 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_inner.html +28 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html +29 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_inner.html +34 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker1.js +32 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker2.js +32 -0
- data/third_party/closure-library/closure/goog/module/abstractmoduleloader.js +56 -0
- data/third_party/closure-library/closure/goog/module/basemodule.js +45 -0
- data/third_party/closure-library/closure/goog/module/loader.js +269 -0
- data/third_party/closure-library/closure/goog/module/module.js +166 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo.js +335 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo_test.html +108 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
- data/third_party/closure-library/closure/goog/module/moduleloader.js +462 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.html +30 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.js +438 -0
- data/third_party/closure-library/closure/goog/module/modulemanager.js +1370 -0
- data/third_party/closure-library/closure/goog/module/modulemanager_test.html +2143 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_1.js +23 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_2.js +27 -0
- data/third_party/closure-library/closure/goog/module/testdata/modB_1.js +31 -0
- data/third_party/closure-library/closure/goog/net/browserchannel.js +2757 -0
- data/third_party/closure-library/closure/goog/net/browserchannel_test.html +1328 -0
- data/third_party/closure-library/closure/goog/net/browsertestchannel.js +618 -0
- data/third_party/closure-library/closure/goog/net/bulkloader.js +181 -0
- data/third_party/closure-library/closure/goog/net/bulkloader_test.html +233 -0
- data/third_party/closure-library/closure/goog/net/bulkloaderhelper.js +127 -0
- data/third_party/closure-library/closure/goog/net/channeldebug.js +300 -0
- data/third_party/closure-library/closure/goog/net/channelrequest.js +1312 -0
- data/third_party/closure-library/closure/goog/net/channelrequest_test.html +280 -0
- data/third_party/closure-library/closure/goog/net/cookies.js +370 -0
- data/third_party/closure-library/closure/goog/net/cookies_test.html +266 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc.js +849 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.css +7 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
- data/third_party/closure-library/closure/goog/net/errorcode.js +130 -0
- data/third_party/closure-library/closure/goog/net/eventtype.js +37 -0
- data/third_party/closure-library/closure/goog/net/filedownloader.js +743 -0
- data/third_party/closure-library/closure/goog/net/filedownloader_test.html +372 -0
- data/third_party/closure-library/closure/goog/net/httpstatus.js +111 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test.html +147 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
- data/third_party/closure-library/closure/goog/net/iframeio.js +1355 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.html +44 -0
- data/third_party/closure-library/closure/goog/net/iframeio_test.html +402 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor.js +200 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
- data/third_party/closure-library/closure/goog/net/imageloader.js +292 -0
- data/third_party/closure-library/closure/goog/net/imageloader_test.html +302 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
- data/third_party/closure-library/closure/goog/net/ipaddress.js +511 -0
- data/third_party/closure-library/closure/goog/net/ipaddress_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/jsloader.js +366 -0
- data/third_party/closure-library/closure/goog/net/jsloader_test.html +142 -0
- data/third_party/closure-library/closure/goog/net/jsonp.js +338 -0
- data/third_party/closure-library/closure/goog/net/jsonp_test.html +327 -0
- data/third_party/closure-library/closure/goog/net/mockiframeio.js +319 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor.js +117 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
- data/third_party/closure-library/closure/goog/net/networkstatusmonitor.js +47 -0
- data/third_party/closure-library/closure/goog/net/networktester.js +383 -0
- data/third_party/closure-library/closure/goog/net/networktester_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test1.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test2.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test3.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test4.js +23 -0
- data/third_party/closure-library/closure/goog/net/tmpnetwork.js +164 -0
- data/third_party/closure-library/closure/goog/net/websocket.js +505 -0
- data/third_party/closure-library/closure/goog/net/websocket_test.html +367 -0
- data/third_party/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
- data/third_party/closure-library/closure/goog/net/xhrio.js +1191 -0
- data/third_party/closure-library/closure/goog/net/xhrio_test.html +732 -0
- data/third_party/closure-library/closure/goog/net/xhriopool.js +80 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager.js +787 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager_test.html +123 -0
- data/third_party/closure-library/closure/goog/net/xmlhttp.js +228 -0
- data/third_party/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel.js +805 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +1024 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannelrole.js +30 -0
- data/third_party/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +254 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport.js +921 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport_test.html +295 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframerelaytransport.js +394 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +649 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +304 -0
- data/third_party/closure-library/closure/goog/net/xpc/nixtransport.js +479 -0
- data/third_party/closure-library/closure/goog/net/xpc/relay.js +72 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/access_checker.html +29 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +96 -0
- data/third_party/closure-library/closure/goog/net/xpc/transport.js +105 -0
- data/third_party/closure-library/closure/goog/net/xpc/xpc.js +293 -0
- data/third_party/closure-library/closure/goog/object/object.js +635 -0
- data/third_party/closure-library/closure/goog/object/object_test.html +466 -0
- data/third_party/closure-library/closure/goog/positioning/absoluteposition.js +74 -0
- data/third_party/closure-library/closure/goog/positioning/abstractposition.js +48 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition.js +92 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition_test.html +77 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition.js +191 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +174 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition.js +88 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.html +22 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.js +122 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition.js +71 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition_test.html +119 -0
- data/third_party/closure-library/closure/goog/positioning/positioning.js +557 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.html +199 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.js +1168 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition.js +121 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition_test.html +189 -0
- data/third_party/closure-library/closure/goog/positioning/viewportposition.js +64 -0
- data/third_party/closure-library/closure/goog/proto/proto.js +44 -0
- data/third_party/closure-library/closure/goog/proto/serializer.js +69 -0
- data/third_party/closure-library/closure/goog/proto/serializer_test.html +43 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor.js +200 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor.js +291 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor_test.html +132 -0
- data/third_party/closure-library/closure/goog/proto2/lazydeserializer.js +70 -0
- data/third_party/closure-library/closure/goog/proto2/message.js +840 -0
- data/third_party/closure-library/closure/goog/proto2/message_test.html +467 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer.js +159 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer_test.html +489 -0
- data/third_party/closure-library/closure/goog/proto2/package_test.pb.js +166 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer.js +193 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer_test.html +504 -0
- data/third_party/closure-library/closure/goog/proto2/proto_test.html +693 -0
- data/third_party/closure-library/closure/goog/proto2/serializer.js +174 -0
- data/third_party/closure-library/closure/goog/proto2/test.pb.js +2876 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer.js +995 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.html +21 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.js +629 -0
- data/third_party/closure-library/closure/goog/proto2/util.js +54 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub.js +326 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_perf.html +298 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
- data/third_party/closure-library/closure/goog/reflect/reflect.js +77 -0
- data/third_party/closure-library/closure/goog/result/chain_test.html +236 -0
- data/third_party/closure-library/closure/goog/result/combine_test.html +229 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor.js +57 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor_test.html +86 -0
- data/third_party/closure-library/closure/goog/result/dependentresult.js +44 -0
- data/third_party/closure-library/closure/goog/result/result_interface.js +109 -0
- data/third_party/closure-library/closure/goog/result/resultutil.js +550 -0
- data/third_party/closure-library/closure/goog/result/resultutil_test.html +46 -0
- data/third_party/closure-library/closure/goog/result/simpleresult.js +217 -0
- data/third_party/closure-library/closure/goog/result/simpleresult_test.html +271 -0
- data/third_party/closure-library/closure/goog/result/transform_test.html +153 -0
- data/third_party/closure-library/closure/goog/result/wait_test.html +211 -0
- data/third_party/closure-library/closure/goog/soy/data.js +132 -0
- data/third_party/closure-library/closure/goog/soy/renderer.js +266 -0
- data/third_party/closure-library/closure/goog/soy/renderer_test.html +172 -0
- data/third_party/closure-library/closure/goog/soy/soy.js +205 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.html +230 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.js +175 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck.js +475 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
- data/third_party/closure-library/closure/goog/stats/basicstat.js +271 -0
- data/third_party/closure-library/closure/goog/stats/basicstat_test.html +167 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage.js +100 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage_test.html +76 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage.js +201 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage_test.html +160 -0
- data/third_party/closure-library/closure/goog/storage/errorcode.js +30 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage.js +142 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage_test.html +90 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorcode.js +31 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism.js +128 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism_test.html +83 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage.js +45 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage_test.html +60 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage.js +46 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage_test.html +61 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage.js +176 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage_test.html +122 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata.js +283 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata_test.html +78 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanism.js +86 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanismtester.js +117 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanism.js +56 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory.js +113 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory_test.html +58 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismseparationtester.js +91 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismsharingtester.js +87 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismtester.js +200 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism.js +97 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism_test.html +66 -0
- data/third_party/closure-library/closure/goog/storage/richstorage.js +149 -0
- data/third_party/closure-library/closure/goog/storage/richstorage_test.html +87 -0
- data/third_party/closure-library/closure/goog/storage/storage.js +111 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.html +64 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.js +60 -0
- data/third_party/closure-library/closure/goog/string/linkify.js +236 -0
- data/third_party/closure-library/closure/goog/string/linkify_test.html +441 -0
- data/third_party/closure-library/closure/goog/string/newlines.js +153 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.js +87 -0
- data/third_party/closure-library/closure/goog/string/parser.js +38 -0
- data/third_party/closure-library/closure/goog/string/path.js +169 -0
- data/third_party/closure-library/closure/goog/string/path_test.html +111 -0
- data/third_party/closure-library/closure/goog/string/string.js +1378 -0
- data/third_party/closure-library/closure/goog/string/string_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/string_test.js +1173 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer.js +103 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
- data/third_party/closure-library/closure/goog/string/stringformat.js +251 -0
- data/third_party/closure-library/closure/goog/string/stringformat_test.html +223 -0
- data/third_party/closure-library/closure/goog/string/stringifier.js +38 -0
- data/third_party/closure-library/closure/goog/structs/avltree.js +835 -0
- data/third_party/closure-library/closure/goog/structs/avltree_test.html +303 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer.js +223 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/structs/collection.js +55 -0
- data/third_party/closure-library/closure/goog/structs/collection_test.html +57 -0
- data/third_party/closure-library/closure/goog/structs/heap.js +333 -0
- data/third_party/closure-library/closure/goog/structs/heap_test.html +220 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap.js +159 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap.js +473 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
- data/third_party/closure-library/closure/goog/structs/map.js +449 -0
- data/third_party/closure-library/closure/goog/structs/map_test.html +430 -0
- data/third_party/closure-library/closure/goog/structs/node.js +74 -0
- data/third_party/closure-library/closure/goog/structs/pool.js +381 -0
- data/third_party/closure-library/closure/goog/structs/pool_test.html +291 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool.js +184 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool_test.html +588 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue.js +64 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/quadtree.js +571 -0
- data/third_party/closure-library/closure/goog/structs/quadtree_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/queue.js +157 -0
- data/third_party/closure-library/closure/goog/structs/queue_test.html +140 -0
- data/third_party/closure-library/closure/goog/structs/set.js +274 -0
- data/third_party/closure-library/closure/goog/structs/set_perf.html +271 -0
- data/third_party/closure-library/closure/goog/structs/set_test.html +581 -0
- data/third_party/closure-library/closure/goog/structs/simplepool.js +205 -0
- data/third_party/closure-library/closure/goog/structs/stringset.js +403 -0
- data/third_party/closure-library/closure/goog/structs/stringset_test.html +265 -0
- data/third_party/closure-library/closure/goog/structs/structs.js +351 -0
- data/third_party/closure-library/closure/goog/structs/structs_test.html +1050 -0
- data/third_party/closure-library/closure/goog/structs/treenode.js +428 -0
- data/third_party/closure-library/closure/goog/structs/treenode_test.html +370 -0
- data/third_party/closure-library/closure/goog/structs/trie.js +368 -0
- data/third_party/closure-library/closure/goog/structs/trie_test.html +378 -0
- data/third_party/closure-library/closure/goog/style/bidi.js +182 -0
- data/third_party/closure-library/closure/goog/style/bidi_test.html +211 -0
- data/third_party/closure-library/closure/goog/style/cursor.js +115 -0
- data/third_party/closure-library/closure/goog/style/cursor_test.html +132 -0
- data/third_party/closure-library/closure/goog/style/style.js +2087 -0
- data/third_party/closure-library/closure/goog/style/style_quirks_test.html +530 -0
- data/third_party/closure-library/closure/goog/style/style_test.html +518 -0
- data/third_party/closure-library/closure/goog/style/style_test.js +2602 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_quirk.html +27 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
- data/third_party/closure-library/closure/goog/style/style_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/style/style_test_standard.html +11 -0
- data/third_party/closure-library/closure/goog/style/style_webkit_scrollbars_test.html +79 -0
- data/third_party/closure-library/closure/goog/style/stylescrollbartester.js +78 -0
- data/third_party/closure-library/closure/goog/style/transition.js +138 -0
- data/third_party/closure-library/closure/goog/style/transition_test.html +124 -0
- data/third_party/closure-library/closure/goog/testing/asserts.js +1243 -0
- data/third_party/closure-library/closure/goog/testing/asserts_test.html +1150 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase.js +824 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_test.html +58 -0
- data/third_party/closure-library/closure/goog/testing/benchmark.js +88 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase.js +689 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase_test.html +352 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase.js +155 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase_test.html +140 -0
- data/third_party/closure-library/closure/goog/testing/dom.js +608 -0
- data/third_party/closure-library/closure/goog/testing/dom_test.html +438 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom.js +293 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
- data/third_party/closure-library/closure/goog/testing/editor/fieldmock.js +99 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper.js +176 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper_test.html +177 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver.js +86 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
- data/third_party/closure-library/closure/goog/testing/events/events.js +713 -0
- data/third_party/closure-library/closure/goog/testing/events/events_test.html +614 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers.js +41 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler.js +64 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler_test.html +89 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures.js +236 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob.js +116 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob_test.html +65 -0
- data/third_party/closure-library/closure/goog/testing/fs/directoryentry_test.html +313 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry.js +621 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry_test.html +227 -0
- data/third_party/closure-library/closure/goog/testing/fs/file.js +52 -0
- data/third_party/closure-library/closure/goog/testing/fs/fileentry_test.html +93 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader.js +272 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader_test.html +236 -0
- data/third_party/closure-library/closure/goog/testing/fs/filesystem.js +63 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter.js +261 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter_test.html +325 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs.js +147 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs_test.html +53 -0
- data/third_party/closure-library/closure/goog/testing/fs/integration_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/fs/progressevent.js +81 -0
- data/third_party/closure-library/closure/goog/testing/functionmock.js +177 -0
- data/third_party/closure-library/closure/goog/testing/functionmock_test.html +511 -0
- data/third_party/closure-library/closure/goog/testing/graphics.js +64 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts.js +77 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.html +19 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.js +67 -0
- data/third_party/closure-library/closure/goog/testing/jsunit.js +156 -0
- data/third_party/closure-library/closure/goog/testing/loosemock.js +240 -0
- data/third_party/closure-library/closure/goog/testing/loosemock_test.html +343 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +79 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageport.js +85 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockportnetwork.js +65 -0
- data/third_party/closure-library/closure/goog/testing/mock.js +619 -0
- data/third_party/closure-library/closure/goog/testing/mock_test.html +264 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory.js +578 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
- data/third_party/closure-library/closure/goog/testing/mockclock.js +520 -0
- data/third_party/closure-library/closure/goog/testing/mockclock_test.html +504 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol.js +219 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
- data/third_party/closure-library/closure/goog/testing/mockinterface.js +45 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers.js +395 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom.js +126 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
- data/third_party/closure-library/closure/goog/testing/mockrange.js +66 -0
- data/third_party/closure-library/closure/goog/testing/mockrange_test.html +41 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage.js +107 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage_test.html +78 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent.js +141 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
- data/third_party/closure-library/closure/goog/testing/multitestrunner.js +1439 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio.js +709 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio_test.html +384 -0
- data/third_party/closure-library/closure/goog/testing/net/xhriopool.js +64 -0
- data/third_party/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.css +46 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.js +190 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer.js +405 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer_test.html +201 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2.js +127 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2_test.html +117 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom.js +179 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction.js +201 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction_test.html +159 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase.js +122 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase_test.html +34 -0
- data/third_party/closure-library/closure/goog/testing/singleton.js +46 -0
- data/third_party/closure-library/closure/goog/testing/singleton_test.html +39 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace.js +555 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace_test.html +327 -0
- data/third_party/closure-library/closure/goog/testing/storage/fakemechanism.js +66 -0
- data/third_party/closure-library/closure/goog/testing/strictmock.js +128 -0
- data/third_party/closure-library/closure/goog/testing/strictmock_test.html +412 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts.js +310 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
- data/third_party/closure-library/closure/goog/testing/style/style.js +101 -0
- data/third_party/closure-library/closure/goog/testing/style/style_test.html +162 -0
- data/third_party/closure-library/closure/goog/testing/testcase.js +1233 -0
- data/third_party/closure-library/closure/goog/testing/testqueue.js +66 -0
- data/third_party/closure-library/closure/goog/testing/testrunner.js +399 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts.js +56 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts_test.html +52 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererharness.js +176 -0
- data/third_party/closure-library/closure/goog/testing/ui/style.js +137 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_test.html +130 -0
- data/third_party/closure-library/closure/goog/timer/timer.js +291 -0
- data/third_party/closure-library/closure/goog/timer/timer_test.html +118 -0
- data/third_party/closure-library/closure/goog/tweak/entries.js +997 -0
- data/third_party/closure-library/closure/goog/tweak/entries_test.html +94 -0
- data/third_party/closure-library/closure/goog/tweak/registry.js +310 -0
- data/third_party/closure-library/closure/goog/tweak/registry_test.html +145 -0
- data/third_party/closure-library/closure/goog/tweak/testhelpers.js +119 -0
- data/third_party/closure-library/closure/goog/tweak/tweak.js +301 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui.js +817 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
- data/third_party/closure-library/closure/goog/ui/abstractspellchecker.js +1138 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac.js +50 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac_test.html +204 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher.js +162 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher_test.html +130 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete.js +919 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete_test.html +1613 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler.js +1308 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler_test.html +685 -0
- data/third_party/closure-library/closure/goog/ui/ac/remote.js +114 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher.js +271 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer.js +1023 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer_test.html +606 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderoptions.js +80 -0
- data/third_party/closure-library/closure/goog/ui/ac/richinputhandler.js +58 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremote.js +107 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremotearraymatcher.js +125 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor.js +347 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor_test.html +150 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip.js +366 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip_test.html +296 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy.js +199 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy_test.html +139 -0
- data/third_party/closure-library/closure/goog/ui/attachablemenu.js +473 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput.js +178 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput_test.html +131 -0
- data/third_party/closure-library/closure/goog/ui/bubble.js +472 -0
- data/third_party/closure-library/closure/goog/ui/button.js +213 -0
- data/third_party/closure-library/closure/goog/ui/button_perf.html +176 -0
- data/third_party/closure-library/closure/goog/ui/button_test.html +257 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer.js +214 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer_test.html +223 -0
- data/third_party/closure-library/closure/goog/ui/buttonside.js +41 -0
- data/third_party/closure-library/closure/goog/ui/charcounter.js +199 -0
- data/third_party/closure-library/closure/goog/ui/charpicker.js +880 -0
- data/third_party/closure-library/closure/goog/ui/charpicker_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/checkbox.js +269 -0
- data/third_party/closure-library/closure/goog/ui/checkbox_test.html +370 -0
- data/third_party/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
- data/third_party/closure-library/closure/goog/ui/checkboxrenderer.js +171 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
- data/third_party/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
- data/third_party/closure-library/closure/goog/ui/colormenubutton.js +215 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette.js +177 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette_test.html +174 -0
- data/third_party/closure-library/closure/goog/ui/colorpicker.js +344 -0
- data/third_party/closure-library/closure/goog/ui/colorsplitbehavior.js +60 -0
- data/third_party/closure-library/closure/goog/ui/combobox.js +961 -0
- data/third_party/closure-library/closure/goog/ui/combobox_test.html +292 -0
- data/third_party/closure-library/closure/goog/ui/component.js +1300 -0
- data/third_party/closure-library/closure/goog/ui/component_test.html +889 -0
- data/third_party/closure-library/closure/goog/ui/container.js +1322 -0
- data/third_party/closure-library/closure/goog/ui/container_perf.html +55 -0
- data/third_party/closure-library/closure/goog/ui/container_test.html +458 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer.js +371 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer_test.html +228 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller.js +222 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/control.js +1387 -0
- data/third_party/closure-library/closure/goog/ui/control_perf.html +166 -0
- data/third_party/closure-library/closure/goog/ui/control_test.html +2142 -0
- data/third_party/closure-library/closure/goog/ui/controlcontent.js +28 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer.js +855 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer_test.html +1100 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor.js +183 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/css3buttonrenderer.js +152 -0
- data/third_party/closure-library/closure/goog/ui/css3menubuttonrenderer.js +147 -0
- data/third_party/closure-library/closure/goog/ui/cssnames.js +29 -0
- data/third_party/closure-library/closure/goog/ui/custombutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/custombuttonrenderer.js +267 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette.js +139 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
- data/third_party/closure-library/closure/goog/ui/datepicker.js +1369 -0
- data/third_party/closure-library/closure/goog/ui/datepicker_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/datepickerrenderer.js +55 -0
- data/third_party/closure-library/closure/goog/ui/decorate.js +38 -0
- data/third_party/closure-library/closure/goog/ui/decorate_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/defaultdatepickerrenderer.js +202 -0
- data/third_party/closure-library/closure/goog/ui/dialog.js +1556 -0
- data/third_party/closure-library/closure/goog/ui/dialog_test.html +776 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker_test.html +171 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer.js +416 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer_test.html +49 -0
- data/third_party/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow.js +486 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow_test.html +92 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog_test.html +473 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble.js +525 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
- data/third_party/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1065 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditordialog.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditorokevent.js +49 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog.js +1064 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog_test.html +653 -0
- data/third_party/closure-library/closure/goog/ui/editor/messages.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/tabpane.js +198 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarcontroller.js +295 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipalette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +208 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker.js +804 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker_test.html +913 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
- data/third_party/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
- data/third_party/closure-library/closure/goog/ui/equation/arrowpalette.js +47 -0
- data/third_party/closure-library/closure/goog/ui/equation/changeevent.js +37 -0
- data/third_party/closure-library/closure/goog/ui/equation/comparisonpalette.js +56 -0
- data/third_party/closure-library/closure/goog/ui/equation/editorpane.js +93 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditor.js +220 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditordialog.js +137 -0
- data/third_party/closure-library/closure/goog/ui/equation/greekpalette.js +75 -0
- data/third_party/closure-library/closure/goog/ui/equation/imagerenderer.js +190 -0
- data/third_party/closure-library/closure/goog/ui/equation/mathpalette.js +55 -0
- data/third_party/closure-library/closure/goog/ui/equation/menupalette.js +86 -0
- data/third_party/closure-library/closure/goog/ui/equation/palette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/equation/palettemanager.js +203 -0
- data/third_party/closure-library/closure/goog/ui/equation/symbolpalette.js +74 -0
- data/third_party/closure-library/closure/goog/ui/equation/texeditor.js +141 -0
- data/third_party/closure-library/closure/goog/ui/equation/texpane.js +444 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu.js +575 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu_test.html +321 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +62 -0
- data/third_party/closure-library/closure/goog/ui/flatbuttonrenderer.js +146 -0
- data/third_party/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +238 -0
- data/third_party/closure-library/closure/goog/ui/formpost.js +109 -0
- data/third_party/closure-library/closure/goog/ui/formpost_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/gauge.js +1011 -0
- data/third_party/closure-library/closure/goog/ui/gaugetheme.js +169 -0
- data/third_party/closure-library/closure/goog/ui/hovercard.js +456 -0
- data/third_party/closure-library/closure/goog/ui/hovercard_test.html +360 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette.js +298 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette.js +505 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette_test.html +219 -0
- data/third_party/closure-library/closure/goog/ui/idgenerator.js +57 -0
- data/third_party/closure-library/closure/goog/ui/idletimer.js +299 -0
- data/third_party/closure-library/closure/goog/ui/idletimer_test.html +100 -0
- data/third_party/closure-library/closure/goog/ui/iframemask.js +257 -0
- data/third_party/closure-library/closure/goog/ui/iframemask_test.html +230 -0
- data/third_party/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
- data/third_party/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker_test.html +111 -0
- data/third_party/closure-library/closure/goog/ui/itemevent.js +50 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler.js +1017 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +702 -0
- data/third_party/closure-library/closure/goog/ui/labelinput.js +592 -0
- data/third_party/closure-library/closure/goog/ui/labelinput_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject.js +631 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr.js +308 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo.js +281 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/media/media.js +285 -0
- data/third_party/closure-library/closure/goog/ui/media/media_test.html +118 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel.js +960 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel_test.html +108 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3.js +228 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
- data/third_party/closure-library/closure/goog/ui/media/photo.js +142 -0
- data/third_party/closure-library/closure/goog/ui/media/photo_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa.js +321 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa_test.html +121 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo.js +276 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo_test.html +102 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube.js +357 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube_test.html +243 -0
- data/third_party/closure-library/closure/goog/ui/menu.js +476 -0
- data/third_party/closure-library/closure/goog/ui/menu_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/menubar.js +44 -0
- data/third_party/closure-library/closure/goog/ui/menubardecorator.js +35 -0
- data/third_party/closure-library/closure/goog/ui/menubarrenderer.js +74 -0
- data/third_party/closure-library/closure/goog/ui/menubase.js +190 -0
- data/third_party/closure-library/closure/goog/ui/menubutton.js +903 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test.html +637 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer.js +266 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer_test.html +179 -0
- data/third_party/closure-library/closure/goog/ui/menuheader.js +62 -0
- data/third_party/closure-library/closure/goog/ui/menuheaderrenderer.js +54 -0
- data/third_party/closure-library/closure/goog/ui/menuitem.js +233 -0
- data/third_party/closure-library/closure/goog/ui/menuitem_test.html +559 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer.js +358 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer_test.html +201 -0
- data/third_party/closure-library/closure/goog/ui/menurenderer.js +123 -0
- data/third_party/closure-library/closure/goog/ui/menuseparator.js +51 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer.js +113 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer_test.html +61 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor.js +71 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.html +19 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.js +94 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup.js +698 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup_test.html +419 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/offlineinstalldialog.js +1089 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscomponent.js +540 -0
- data/third_party/closure-library/closure/goog/ui/option.js +68 -0
- data/third_party/closure-library/closure/goog/ui/palette.js +598 -0
- data/third_party/closure-library/closure/goog/ui/palette_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer.js +372 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer_test.html +83 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker.js +672 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker_test.html +239 -0
- data/third_party/closure-library/closure/goog/ui/popup.js +344 -0
- data/third_party/closure-library/closure/goog/ui/popup_test.html +137 -0
- data/third_party/closure-library/closure/goog/ui/popupbase.js +822 -0
- data/third_party/closure-library/closure/goog/ui/popupbase_test.html +484 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
- data/third_party/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu.js +557 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu_test.html +308 -0
- data/third_party/closure-library/closure/goog/ui/progressbar.js +401 -0
- data/third_party/closure-library/closure/goog/ui/prompt.js +405 -0
- data/third_party/closure-library/closure/goog/ui/prompt_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel.js +302 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
- data/third_party/closure-library/closure/goog/ui/ratings.js +451 -0
- data/third_party/closure-library/closure/goog/ui/registry.js +167 -0
- data/third_party/closure-library/closure/goog/ui/registry_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker.js +626 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker_test.html +247 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel.js +625 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
- data/third_party/closure-library/closure/goog/ui/roundedtabrenderer.js +197 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater.js +585 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/select.js +434 -0
- data/third_party/closure-library/closure/goog/ui/select_test.html +235 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton.js +299 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel.js +300 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel_test.html +225 -0
- data/third_party/closure-library/closure/goog/ui/separator.js +80 -0
- data/third_party/closure-library/closure/goog/ui/serverchart.js +1837 -0
- data/third_party/closure-library/closure/goog/ui/serverchart_test.html +638 -0
- data/third_party/closure-library/closure/goog/ui/slider.js +126 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase.js +1592 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase_test.html +897 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior.js +340 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
- data/third_party/closure-library/closure/goog/ui/splitpane.js +898 -0
- data/third_party/closure-library/closure/goog/ui/splitpane_test.html +229 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer.js +201 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
- data/third_party/closure-library/closure/goog/ui/submenu.js +667 -0
- data/third_party/closure-library/closure/goog/ui/submenu_test.html +563 -0
- data/third_party/closure-library/closure/goog/ui/submenurenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/tab.js +102 -0
- data/third_party/closure-library/closure/goog/ui/tab_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/tabbar.js +394 -0
- data/third_party/closure-library/closure/goog/ui/tabbar_test.html +612 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer.js +175 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer_test.html +138 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter.js +325 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter_test.html +197 -0
- data/third_party/closure-library/closure/goog/ui/tabpane.js +675 -0
- data/third_party/closure-library/closure/goog/ui/tabpane_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer.js +153 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/textarea.js +577 -0
- data/third_party/closure-library/closure/goog/ui/textarea_test.html +314 -0
- data/third_party/closure-library/closure/goog/ui/textarearenderer.js +169 -0
- data/third_party/closure-library/closure/goog/ui/togglebutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbar.js +46 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbutton.js +55 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubutton.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarrenderer.js +99 -0
- data/third_party/closure-library/closure/goog/ui/toolbarselect.js +56 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparator.js +53 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +91 -0
- data/third_party/closure-library/closure/goog/ui/toolbartogglebutton.js +54 -0
- data/third_party/closure-library/closure/goog/ui/tooltip.js +999 -0
- data/third_party/closure-library/closure/goog/ui/tooltip_test.html +380 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode.js +1458 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode_test.html +232 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol.js +663 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
- data/third_party/closure-library/closure/goog/ui/tree/treenode.js +107 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitem.js +184 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +84 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider.js +157 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider_test.html +39 -0
- data/third_party/closure-library/closure/goog/ui/zippy.js +445 -0
- data/third_party/closure-library/closure/goog/ui/zippy_test.html +315 -0
- data/third_party/closure-library/closure/goog/uri/uri.js +1502 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.html +21 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.js +1048 -0
- data/third_party/closure-library/closure/goog/uri/utils.js +1053 -0
- data/third_party/closure-library/closure/goog/uri/utils_test.html +562 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader.js +90 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/flash.js +153 -0
- data/third_party/closure-library/closure/goog/useragent/flash_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/iphoto.js +87 -0
- data/third_party/closure-library/closure/goog/useragent/jscript.js +95 -0
- data/third_party/closure-library/closure/goog/useragent/jscript_test.html +65 -0
- data/third_party/closure-library/closure/goog/useragent/picasa.js +112 -0
- data/third_party/closure-library/closure/goog/useragent/platform.js +82 -0
- data/third_party/closure-library/closure/goog/useragent/platform_test.html +182 -0
- data/third_party/closure-library/closure/goog/useragent/product.js +253 -0
- data/third_party/closure-library/closure/goog/useragent/product_isversion.js +140 -0
- data/third_party/closure-library/closure/goog/useragent/product_test.html +380 -0
- data/third_party/closure-library/closure/goog/useragent/useragent.js +599 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_quirks_test.html +27 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_test.html +300 -0
- data/third_party/closure-library/closure/goog/vec/float32array.js +110 -0
- data/third_party/closure-library/closure/goog/vec/float32array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/float64array.js +117 -0
- data/third_party/closure-library/closure/goog/vec/float64array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/mat3.js +1211 -0
- data/third_party/closure-library/closure/goog/vec/mat3_test.html +465 -0
- data/third_party/closure-library/closure/goog/vec/mat3d.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3d_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat3f.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3f_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat4.js +1822 -0
- data/third_party/closure-library/closure/goog/vec/mat4_test.html +781 -0
- data/third_party/closure-library/closure/goog/vec/mat4d.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4d_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/mat4f.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4f_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/matrix3.js +720 -0
- data/third_party/closure-library/closure/goog/vec/matrix3_test.html +301 -0
- data/third_party/closure-library/closure/goog/vec/matrix4.js +1405 -0
- data/third_party/closure-library/closure/goog/vec/matrix4_test.html +626 -0
- data/third_party/closure-library/closure/goog/vec/quaternion.js +458 -0
- data/third_party/closure-library/closure/goog/vec/quaternion_test.html +195 -0
- data/third_party/closure-library/closure/goog/vec/ray.js +94 -0
- data/third_party/closure-library/closure/goog/vec/ray_test.html +66 -0
- data/third_party/closure-library/closure/goog/vec/vec.js +73 -0
- data/third_party/closure-library/closure/goog/vec/vec2.js +376 -0
- data/third_party/closure-library/closure/goog/vec/vec2_test.html +216 -0
- data/third_party/closure-library/closure/goog/vec/vec2d.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2d_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec2f.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2f_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec3.js +474 -0
- data/third_party/closure-library/closure/goog/vec/vec3_test.html +258 -0
- data/third_party/closure-library/closure/goog/vec/vec3d.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3d_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec3f.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3f_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec4.js +406 -0
- data/third_party/closure-library/closure/goog/vec/vec4_test.html +192 -0
- data/third_party/closure-library/closure/goog/vec/vec4d.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4d_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec4f.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4f_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec_array_perf.html +443 -0
- data/third_party/closure-library/closure/goog/vec/vec_perf.html +101 -0
- data/third_party/closure-library/closure/goog/webgl/webgl.js +2194 -0
- data/third_party/closure-library/closure/goog/window/window.js +225 -0
- data/third_party/closure-library/closure/goog/window/window_test.html +239 -0
- data/third_party/closure-library/closure/known_issues/testdata/closure_library_warnings.txt +47 -0
- data/third_party/closure-library/third_party/closure/goog/base.js +2 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
- data/third_party/closure-library/third_party/closure/goog/deps.js +20 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query.js +1543 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_compiled_test.html +65 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.html +64 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.js +158 -0
- data/third_party/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +60 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred.js +764 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_async_test.html +144 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +877 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +205 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +504 -0
- data/third_party/closure-library/third_party/closure/goog/osapi/osapi.js +95 -0
- metadata +2054 -0
@@ -0,0 +1,2700 @@
|
|
1
|
+
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS-IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
/**
|
16
|
+
* @fileoverview Utilities for manipulating the browser's Document Object Model
|
17
|
+
* Inspiration taken *heavily* from mochikit (http://mochikit.com/).
|
18
|
+
*
|
19
|
+
* You can use {@link goog.dom.DomHelper} to create new dom helpers that refer
|
20
|
+
* to a different document object. This is useful if you are working with
|
21
|
+
* frames or multiple windows.
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
|
25
|
+
|
26
|
+
// TODO(arv): Rename/refactor getTextContent and getRawTextContent. The problem
|
27
|
+
// is that getTextContent should mimic the DOM3 textContent. We should add a
|
28
|
+
// getInnerText (or getText) which tries to return the visible text, innerText.
|
29
|
+
|
30
|
+
|
31
|
+
goog.provide('goog.dom');
|
32
|
+
goog.provide('goog.dom.Appendable');
|
33
|
+
goog.provide('goog.dom.DomHelper');
|
34
|
+
goog.provide('goog.dom.NodeType');
|
35
|
+
|
36
|
+
goog.require('goog.array');
|
37
|
+
goog.require('goog.dom.BrowserFeature');
|
38
|
+
goog.require('goog.dom.TagName');
|
39
|
+
goog.require('goog.dom.classes');
|
40
|
+
goog.require('goog.math.Coordinate');
|
41
|
+
goog.require('goog.math.Size');
|
42
|
+
goog.require('goog.object');
|
43
|
+
goog.require('goog.string');
|
44
|
+
goog.require('goog.userAgent');
|
45
|
+
|
46
|
+
|
47
|
+
/**
|
48
|
+
* @define {boolean} Whether we know at compile time that the browser is in
|
49
|
+
* quirks mode.
|
50
|
+
*/
|
51
|
+
goog.define('goog.dom.ASSUME_QUIRKS_MODE', false);
|
52
|
+
|
53
|
+
|
54
|
+
/**
|
55
|
+
* @define {boolean} Whether we know at compile time that the browser is in
|
56
|
+
* standards compliance mode.
|
57
|
+
*/
|
58
|
+
goog.define('goog.dom.ASSUME_STANDARDS_MODE', false);
|
59
|
+
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Whether we know the compatibility mode at compile time.
|
63
|
+
* @type {boolean}
|
64
|
+
* @private
|
65
|
+
*/
|
66
|
+
goog.dom.COMPAT_MODE_KNOWN_ =
|
67
|
+
goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
|
68
|
+
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Enumeration for DOM node types (for reference)
|
72
|
+
* @enum {number}
|
73
|
+
*/
|
74
|
+
goog.dom.NodeType = {
|
75
|
+
ELEMENT: 1,
|
76
|
+
ATTRIBUTE: 2,
|
77
|
+
TEXT: 3,
|
78
|
+
CDATA_SECTION: 4,
|
79
|
+
ENTITY_REFERENCE: 5,
|
80
|
+
ENTITY: 6,
|
81
|
+
PROCESSING_INSTRUCTION: 7,
|
82
|
+
COMMENT: 8,
|
83
|
+
DOCUMENT: 9,
|
84
|
+
DOCUMENT_TYPE: 10,
|
85
|
+
DOCUMENT_FRAGMENT: 11,
|
86
|
+
NOTATION: 12
|
87
|
+
};
|
88
|
+
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Gets the DomHelper object for the document where the element resides.
|
92
|
+
* @param {(Node|Window)=} opt_element If present, gets the DomHelper for this
|
93
|
+
* element.
|
94
|
+
* @return {!goog.dom.DomHelper} The DomHelper.
|
95
|
+
*/
|
96
|
+
goog.dom.getDomHelper = function(opt_element) {
|
97
|
+
return opt_element ?
|
98
|
+
new goog.dom.DomHelper(goog.dom.getOwnerDocument(opt_element)) :
|
99
|
+
(goog.dom.defaultDomHelper_ ||
|
100
|
+
(goog.dom.defaultDomHelper_ = new goog.dom.DomHelper()));
|
101
|
+
};
|
102
|
+
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Cached default DOM helper.
|
106
|
+
* @type {goog.dom.DomHelper}
|
107
|
+
* @private
|
108
|
+
*/
|
109
|
+
goog.dom.defaultDomHelper_;
|
110
|
+
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Gets the document object being used by the dom library.
|
114
|
+
* @return {!Document} Document object.
|
115
|
+
*/
|
116
|
+
goog.dom.getDocument = function() {
|
117
|
+
return document;
|
118
|
+
};
|
119
|
+
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Alias for getElementById. If a DOM node is passed in then we just return
|
123
|
+
* that.
|
124
|
+
* @param {string|Element} element Element ID or a DOM node.
|
125
|
+
* @return {Element} The element with the given ID, or the node passed in.
|
126
|
+
*/
|
127
|
+
goog.dom.getElement = function(element) {
|
128
|
+
return goog.isString(element) ?
|
129
|
+
document.getElementById(element) : element;
|
130
|
+
};
|
131
|
+
|
132
|
+
|
133
|
+
/**
|
134
|
+
* Alias for getElement.
|
135
|
+
* @param {string|Element} element Element ID or a DOM node.
|
136
|
+
* @return {Element} The element with the given ID, or the node passed in.
|
137
|
+
* @deprecated Use {@link goog.dom.getElement} instead.
|
138
|
+
*/
|
139
|
+
goog.dom.$ = goog.dom.getElement;
|
140
|
+
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Looks up elements by both tag and class name, using browser native functions
|
144
|
+
* ({@code querySelectorAll}, {@code getElementsByTagName} or
|
145
|
+
* {@code getElementsByClassName}) where possible. This function
|
146
|
+
* is a useful, if limited, way of collecting a list of DOM elements
|
147
|
+
* with certain characteristics. {@code goog.dom.query} offers a
|
148
|
+
* more powerful and general solution which allows matching on CSS3
|
149
|
+
* selector expressions, but at increased cost in code size. If all you
|
150
|
+
* need is particular tags belonging to a single class, this function
|
151
|
+
* is fast and sleek.
|
152
|
+
*
|
153
|
+
* @see {goog.dom.query}
|
154
|
+
*
|
155
|
+
* @param {?string=} opt_tag Element tag name.
|
156
|
+
* @param {?string=} opt_class Optional class name.
|
157
|
+
* @param {(Document|Element)=} opt_el Optional element to look in.
|
158
|
+
* @return { {length: number} } Array-like list of elements (only a length
|
159
|
+
* property and numerical indices are guaranteed to exist).
|
160
|
+
*/
|
161
|
+
goog.dom.getElementsByTagNameAndClass = function(opt_tag, opt_class, opt_el) {
|
162
|
+
return goog.dom.getElementsByTagNameAndClass_(document, opt_tag, opt_class,
|
163
|
+
opt_el);
|
164
|
+
};
|
165
|
+
|
166
|
+
|
167
|
+
/**
|
168
|
+
* Returns an array of all the elements with the provided className.
|
169
|
+
* @see {goog.dom.query}
|
170
|
+
* @param {string} className the name of the class to look for.
|
171
|
+
* @param {(Document|Element)=} opt_el Optional element to look in.
|
172
|
+
* @return { {length: number} } The items found with the class name provided.
|
173
|
+
*/
|
174
|
+
goog.dom.getElementsByClass = function(className, opt_el) {
|
175
|
+
var parent = opt_el || document;
|
176
|
+
if (goog.dom.canUseQuerySelector_(parent)) {
|
177
|
+
return parent.querySelectorAll('.' + className);
|
178
|
+
} else if (parent.getElementsByClassName) {
|
179
|
+
return parent.getElementsByClassName(className);
|
180
|
+
}
|
181
|
+
return goog.dom.getElementsByTagNameAndClass_(
|
182
|
+
document, '*', className, opt_el);
|
183
|
+
};
|
184
|
+
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Returns the first element with the provided className.
|
188
|
+
* @see {goog.dom.query}
|
189
|
+
* @param {string} className the name of the class to look for.
|
190
|
+
* @param {Element|Document=} opt_el Optional element to look in.
|
191
|
+
* @return {Element} The first item with the class name provided.
|
192
|
+
*/
|
193
|
+
goog.dom.getElementByClass = function(className, opt_el) {
|
194
|
+
var parent = opt_el || document;
|
195
|
+
var retVal = null;
|
196
|
+
if (goog.dom.canUseQuerySelector_(parent)) {
|
197
|
+
retVal = parent.querySelector('.' + className);
|
198
|
+
} else {
|
199
|
+
retVal = goog.dom.getElementsByClass(className, opt_el)[0];
|
200
|
+
}
|
201
|
+
return retVal || null;
|
202
|
+
};
|
203
|
+
|
204
|
+
|
205
|
+
/**
|
206
|
+
* Prefer the standardized (http://www.w3.org/TR/selectors-api/), native and
|
207
|
+
* fast W3C Selectors API.
|
208
|
+
* @param {!(Element|Document)} parent The parent document object.
|
209
|
+
* @return {boolean} whether or not we can use parent.querySelector* APIs.
|
210
|
+
* @private
|
211
|
+
*/
|
212
|
+
goog.dom.canUseQuerySelector_ = function(parent) {
|
213
|
+
return !!(parent.querySelectorAll && parent.querySelector);
|
214
|
+
};
|
215
|
+
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Helper for {@code getElementsByTagNameAndClass}.
|
219
|
+
* @param {!Document} doc The document to get the elements in.
|
220
|
+
* @param {?string=} opt_tag Element tag name.
|
221
|
+
* @param {?string=} opt_class Optional class name.
|
222
|
+
* @param {(Document|Element)=} opt_el Optional element to look in.
|
223
|
+
* @return { {length: number} } Array-like list of elements (only a length
|
224
|
+
* property and numerical indices are guaranteed to exist).
|
225
|
+
* @private
|
226
|
+
*/
|
227
|
+
goog.dom.getElementsByTagNameAndClass_ = function(doc, opt_tag, opt_class,
|
228
|
+
opt_el) {
|
229
|
+
var parent = opt_el || doc;
|
230
|
+
var tagName = (opt_tag && opt_tag != '*') ? opt_tag.toUpperCase() : '';
|
231
|
+
|
232
|
+
if (goog.dom.canUseQuerySelector_(parent) &&
|
233
|
+
(tagName || opt_class)) {
|
234
|
+
var query = tagName + (opt_class ? '.' + opt_class : '');
|
235
|
+
return parent.querySelectorAll(query);
|
236
|
+
}
|
237
|
+
|
238
|
+
// Use the native getElementsByClassName if available, under the assumption
|
239
|
+
// that even when the tag name is specified, there will be fewer elements to
|
240
|
+
// filter through when going by class than by tag name
|
241
|
+
if (opt_class && parent.getElementsByClassName) {
|
242
|
+
var els = parent.getElementsByClassName(opt_class);
|
243
|
+
|
244
|
+
if (tagName) {
|
245
|
+
var arrayLike = {};
|
246
|
+
var len = 0;
|
247
|
+
|
248
|
+
// Filter for specific tags if requested.
|
249
|
+
for (var i = 0, el; el = els[i]; i++) {
|
250
|
+
if (tagName == el.nodeName) {
|
251
|
+
arrayLike[len++] = el;
|
252
|
+
}
|
253
|
+
}
|
254
|
+
arrayLike.length = len;
|
255
|
+
|
256
|
+
return arrayLike;
|
257
|
+
} else {
|
258
|
+
return els;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
var els = parent.getElementsByTagName(tagName || '*');
|
263
|
+
|
264
|
+
if (opt_class) {
|
265
|
+
var arrayLike = {};
|
266
|
+
var len = 0;
|
267
|
+
for (var i = 0, el; el = els[i]; i++) {
|
268
|
+
var className = el.className;
|
269
|
+
// Check if className has a split function since SVG className does not.
|
270
|
+
if (typeof className.split == 'function' &&
|
271
|
+
goog.array.contains(className.split(/\s+/), opt_class)) {
|
272
|
+
arrayLike[len++] = el;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
arrayLike.length = len;
|
276
|
+
return arrayLike;
|
277
|
+
} else {
|
278
|
+
return els;
|
279
|
+
}
|
280
|
+
};
|
281
|
+
|
282
|
+
|
283
|
+
/**
|
284
|
+
* Alias for {@code getElementsByTagNameAndClass}.
|
285
|
+
* @param {?string=} opt_tag Element tag name.
|
286
|
+
* @param {?string=} opt_class Optional class name.
|
287
|
+
* @param {Element=} opt_el Optional element to look in.
|
288
|
+
* @return { {length: number} } Array-like list of elements (only a length
|
289
|
+
* property and numerical indices are guaranteed to exist).
|
290
|
+
* @deprecated Use {@link goog.dom.getElementsByTagNameAndClass} instead.
|
291
|
+
*/
|
292
|
+
goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
|
293
|
+
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Sets multiple properties on a node.
|
297
|
+
* @param {Element} element DOM node to set properties on.
|
298
|
+
* @param {Object} properties Hash of property:value pairs.
|
299
|
+
*/
|
300
|
+
goog.dom.setProperties = function(element, properties) {
|
301
|
+
goog.object.forEach(properties, function(val, key) {
|
302
|
+
if (key == 'style') {
|
303
|
+
element.style.cssText = val;
|
304
|
+
} else if (key == 'class') {
|
305
|
+
element.className = val;
|
306
|
+
} else if (key == 'for') {
|
307
|
+
element.htmlFor = val;
|
308
|
+
} else if (key in goog.dom.DIRECT_ATTRIBUTE_MAP_) {
|
309
|
+
element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val);
|
310
|
+
} else if (goog.string.startsWith(key, 'aria-') ||
|
311
|
+
goog.string.startsWith(key, 'data-')) {
|
312
|
+
element.setAttribute(key, val);
|
313
|
+
} else {
|
314
|
+
element[key] = val;
|
315
|
+
}
|
316
|
+
});
|
317
|
+
};
|
318
|
+
|
319
|
+
|
320
|
+
/**
|
321
|
+
* Map of attributes that should be set using
|
322
|
+
* element.setAttribute(key, val) instead of element[key] = val. Used
|
323
|
+
* by goog.dom.setProperties.
|
324
|
+
*
|
325
|
+
* @type {Object}
|
326
|
+
* @private
|
327
|
+
*/
|
328
|
+
goog.dom.DIRECT_ATTRIBUTE_MAP_ = {
|
329
|
+
'cellpadding': 'cellPadding',
|
330
|
+
'cellspacing': 'cellSpacing',
|
331
|
+
'colspan': 'colSpan',
|
332
|
+
'frameborder': 'frameBorder',
|
333
|
+
'height': 'height',
|
334
|
+
'maxlength': 'maxLength',
|
335
|
+
'role': 'role',
|
336
|
+
'rowspan': 'rowSpan',
|
337
|
+
'type': 'type',
|
338
|
+
'usemap': 'useMap',
|
339
|
+
'valign': 'vAlign',
|
340
|
+
'width': 'width'
|
341
|
+
};
|
342
|
+
|
343
|
+
|
344
|
+
/**
|
345
|
+
* Gets the dimensions of the viewport.
|
346
|
+
*
|
347
|
+
* Gecko Standards mode:
|
348
|
+
* docEl.clientWidth Width of viewport excluding scrollbar.
|
349
|
+
* win.innerWidth Width of viewport including scrollbar.
|
350
|
+
* body.clientWidth Width of body element.
|
351
|
+
*
|
352
|
+
* docEl.clientHeight Height of viewport excluding scrollbar.
|
353
|
+
* win.innerHeight Height of viewport including scrollbar.
|
354
|
+
* body.clientHeight Height of document.
|
355
|
+
*
|
356
|
+
* Gecko Backwards compatible mode:
|
357
|
+
* docEl.clientWidth Width of viewport excluding scrollbar.
|
358
|
+
* win.innerWidth Width of viewport including scrollbar.
|
359
|
+
* body.clientWidth Width of viewport excluding scrollbar.
|
360
|
+
*
|
361
|
+
* docEl.clientHeight Height of document.
|
362
|
+
* win.innerHeight Height of viewport including scrollbar.
|
363
|
+
* body.clientHeight Height of viewport excluding scrollbar.
|
364
|
+
*
|
365
|
+
* IE6/7 Standards mode:
|
366
|
+
* docEl.clientWidth Width of viewport excluding scrollbar.
|
367
|
+
* win.innerWidth Undefined.
|
368
|
+
* body.clientWidth Width of body element.
|
369
|
+
*
|
370
|
+
* docEl.clientHeight Height of viewport excluding scrollbar.
|
371
|
+
* win.innerHeight Undefined.
|
372
|
+
* body.clientHeight Height of document element.
|
373
|
+
*
|
374
|
+
* IE5 + IE6/7 Backwards compatible mode:
|
375
|
+
* docEl.clientWidth 0.
|
376
|
+
* win.innerWidth Undefined.
|
377
|
+
* body.clientWidth Width of viewport excluding scrollbar.
|
378
|
+
*
|
379
|
+
* docEl.clientHeight 0.
|
380
|
+
* win.innerHeight Undefined.
|
381
|
+
* body.clientHeight Height of viewport excluding scrollbar.
|
382
|
+
*
|
383
|
+
* Opera 9 Standards and backwards compatible mode:
|
384
|
+
* docEl.clientWidth Width of viewport excluding scrollbar.
|
385
|
+
* win.innerWidth Width of viewport including scrollbar.
|
386
|
+
* body.clientWidth Width of viewport excluding scrollbar.
|
387
|
+
*
|
388
|
+
* docEl.clientHeight Height of document.
|
389
|
+
* win.innerHeight Height of viewport including scrollbar.
|
390
|
+
* body.clientHeight Height of viewport excluding scrollbar.
|
391
|
+
*
|
392
|
+
* WebKit:
|
393
|
+
* Safari 2
|
394
|
+
* docEl.clientHeight Same as scrollHeight.
|
395
|
+
* docEl.clientWidth Same as innerWidth.
|
396
|
+
* win.innerWidth Width of viewport excluding scrollbar.
|
397
|
+
* win.innerHeight Height of the viewport including scrollbar.
|
398
|
+
* frame.innerHeight Height of the viewport exluding scrollbar.
|
399
|
+
*
|
400
|
+
* Safari 3 (tested in 522)
|
401
|
+
*
|
402
|
+
* docEl.clientWidth Width of viewport excluding scrollbar.
|
403
|
+
* docEl.clientHeight Height of viewport excluding scrollbar in strict mode.
|
404
|
+
* body.clientHeight Height of viewport excluding scrollbar in quirks mode.
|
405
|
+
*
|
406
|
+
* @param {Window=} opt_window Optional window element to test.
|
407
|
+
* @return {!goog.math.Size} Object with values 'width' and 'height'.
|
408
|
+
*/
|
409
|
+
goog.dom.getViewportSize = function(opt_window) {
|
410
|
+
// TODO(arv): This should not take an argument
|
411
|
+
return goog.dom.getViewportSize_(opt_window || window);
|
412
|
+
};
|
413
|
+
|
414
|
+
|
415
|
+
/**
|
416
|
+
* Helper for {@code getViewportSize}.
|
417
|
+
* @param {Window} win The window to get the view port size for.
|
418
|
+
* @return {!goog.math.Size} Object with values 'width' and 'height'.
|
419
|
+
* @private
|
420
|
+
*/
|
421
|
+
goog.dom.getViewportSize_ = function(win) {
|
422
|
+
var doc = win.document;
|
423
|
+
var el = goog.dom.isCss1CompatMode_(doc) ? doc.documentElement : doc.body;
|
424
|
+
return new goog.math.Size(el.clientWidth, el.clientHeight);
|
425
|
+
};
|
426
|
+
|
427
|
+
|
428
|
+
/**
|
429
|
+
* Calculates the height of the document.
|
430
|
+
*
|
431
|
+
* @return {number} The height of the current document.
|
432
|
+
*/
|
433
|
+
goog.dom.getDocumentHeight = function() {
|
434
|
+
return goog.dom.getDocumentHeight_(window);
|
435
|
+
};
|
436
|
+
|
437
|
+
|
438
|
+
/**
|
439
|
+
* Calculates the height of the document of the given window.
|
440
|
+
*
|
441
|
+
* Function code copied from the opensocial gadget api:
|
442
|
+
* gadgets.window.adjustHeight(opt_height)
|
443
|
+
*
|
444
|
+
* @private
|
445
|
+
* @param {Window} win The window whose document height to retrieve.
|
446
|
+
* @return {number} The height of the document of the given window.
|
447
|
+
*/
|
448
|
+
goog.dom.getDocumentHeight_ = function(win) {
|
449
|
+
// NOTE(eae): This method will return the window size rather than the document
|
450
|
+
// size in webkit quirks mode.
|
451
|
+
var doc = win.document;
|
452
|
+
var height = 0;
|
453
|
+
|
454
|
+
if (doc) {
|
455
|
+
// Calculating inner content height is hard and different between
|
456
|
+
// browsers rendering in Strict vs. Quirks mode. We use a combination of
|
457
|
+
// three properties within document.body and document.documentElement:
|
458
|
+
// - scrollHeight
|
459
|
+
// - offsetHeight
|
460
|
+
// - clientHeight
|
461
|
+
// These values differ significantly between browsers and rendering modes.
|
462
|
+
// But there are patterns. It just takes a lot of time and persistence
|
463
|
+
// to figure out.
|
464
|
+
|
465
|
+
// Get the height of the viewport
|
466
|
+
var vh = goog.dom.getViewportSize_(win).height;
|
467
|
+
var body = doc.body;
|
468
|
+
var docEl = doc.documentElement;
|
469
|
+
if (goog.dom.isCss1CompatMode_(doc) && docEl.scrollHeight) {
|
470
|
+
// In Strict mode:
|
471
|
+
// The inner content height is contained in either:
|
472
|
+
// document.documentElement.scrollHeight
|
473
|
+
// document.documentElement.offsetHeight
|
474
|
+
// Based on studying the values output by different browsers,
|
475
|
+
// use the value that's NOT equal to the viewport height found above.
|
476
|
+
height = docEl.scrollHeight != vh ?
|
477
|
+
docEl.scrollHeight : docEl.offsetHeight;
|
478
|
+
} else {
|
479
|
+
// In Quirks mode:
|
480
|
+
// documentElement.clientHeight is equal to documentElement.offsetHeight
|
481
|
+
// except in IE. In most browsers, document.documentElement can be used
|
482
|
+
// to calculate the inner content height.
|
483
|
+
// However, in other browsers (e.g. IE), document.body must be used
|
484
|
+
// instead. How do we know which one to use?
|
485
|
+
// If document.documentElement.clientHeight does NOT equal
|
486
|
+
// document.documentElement.offsetHeight, then use document.body.
|
487
|
+
var sh = docEl.scrollHeight;
|
488
|
+
var oh = docEl.offsetHeight;
|
489
|
+
if (docEl.clientHeight != oh) {
|
490
|
+
sh = body.scrollHeight;
|
491
|
+
oh = body.offsetHeight;
|
492
|
+
}
|
493
|
+
|
494
|
+
// Detect whether the inner content height is bigger or smaller
|
495
|
+
// than the bounding box (viewport). If bigger, take the larger
|
496
|
+
// value. If smaller, take the smaller value.
|
497
|
+
if (sh > vh) {
|
498
|
+
// Content is larger
|
499
|
+
height = sh > oh ? sh : oh;
|
500
|
+
} else {
|
501
|
+
// Content is smaller
|
502
|
+
height = sh < oh ? sh : oh;
|
503
|
+
}
|
504
|
+
}
|
505
|
+
}
|
506
|
+
|
507
|
+
return height;
|
508
|
+
};
|
509
|
+
|
510
|
+
|
511
|
+
/**
|
512
|
+
* Gets the page scroll distance as a coordinate object.
|
513
|
+
*
|
514
|
+
* @param {Window=} opt_window Optional window element to test.
|
515
|
+
* @return {!goog.math.Coordinate} Object with values 'x' and 'y'.
|
516
|
+
* @deprecated Use {@link goog.dom.getDocumentScroll} instead.
|
517
|
+
*/
|
518
|
+
goog.dom.getPageScroll = function(opt_window) {
|
519
|
+
var win = opt_window || goog.global || window;
|
520
|
+
return goog.dom.getDomHelper(win.document).getDocumentScroll();
|
521
|
+
};
|
522
|
+
|
523
|
+
|
524
|
+
/**
|
525
|
+
* Gets the document scroll distance as a coordinate object.
|
526
|
+
*
|
527
|
+
* @return {!goog.math.Coordinate} Object with values 'x' and 'y'.
|
528
|
+
*/
|
529
|
+
goog.dom.getDocumentScroll = function() {
|
530
|
+
return goog.dom.getDocumentScroll_(document);
|
531
|
+
};
|
532
|
+
|
533
|
+
|
534
|
+
/**
|
535
|
+
* Helper for {@code getDocumentScroll}.
|
536
|
+
*
|
537
|
+
* @param {!Document} doc The document to get the scroll for.
|
538
|
+
* @return {!goog.math.Coordinate} Object with values 'x' and 'y'.
|
539
|
+
* @private
|
540
|
+
*/
|
541
|
+
goog.dom.getDocumentScroll_ = function(doc) {
|
542
|
+
var el = goog.dom.getDocumentScrollElement_(doc);
|
543
|
+
var win = goog.dom.getWindow_(doc);
|
544
|
+
if (goog.userAgent.IE && goog.userAgent.isVersionOrHigher('10') &&
|
545
|
+
win.pageYOffset != el.scrollTop) {
|
546
|
+
// The keyboard on IE10 touch devices shifts the page using the pageYOffset
|
547
|
+
// without modifying scrollTop. For this case, we want the body scroll
|
548
|
+
// offsets.
|
549
|
+
return new goog.math.Coordinate(el.scrollLeft, el.scrollTop);
|
550
|
+
}
|
551
|
+
return new goog.math.Coordinate(win.pageXOffset || el.scrollLeft,
|
552
|
+
win.pageYOffset || el.scrollTop);
|
553
|
+
};
|
554
|
+
|
555
|
+
|
556
|
+
/**
|
557
|
+
* Gets the document scroll element.
|
558
|
+
* @return {Element} Scrolling element.
|
559
|
+
*/
|
560
|
+
goog.dom.getDocumentScrollElement = function() {
|
561
|
+
return goog.dom.getDocumentScrollElement_(document);
|
562
|
+
};
|
563
|
+
|
564
|
+
|
565
|
+
/**
|
566
|
+
* Helper for {@code getDocumentScrollElement}.
|
567
|
+
* @param {!Document} doc The document to get the scroll element for.
|
568
|
+
* @return {Element} Scrolling element.
|
569
|
+
* @private
|
570
|
+
*/
|
571
|
+
goog.dom.getDocumentScrollElement_ = function(doc) {
|
572
|
+
// Safari (2 and 3) needs body.scrollLeft in both quirks mode and strict mode.
|
573
|
+
return !goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(doc) ?
|
574
|
+
doc.documentElement : doc.body;
|
575
|
+
};
|
576
|
+
|
577
|
+
|
578
|
+
/**
|
579
|
+
* Gets the window object associated with the given document.
|
580
|
+
*
|
581
|
+
* @param {Document=} opt_doc Document object to get window for.
|
582
|
+
* @return {!Window} The window associated with the given document.
|
583
|
+
*/
|
584
|
+
goog.dom.getWindow = function(opt_doc) {
|
585
|
+
// TODO(arv): This should not take an argument.
|
586
|
+
return opt_doc ? goog.dom.getWindow_(opt_doc) : window;
|
587
|
+
};
|
588
|
+
|
589
|
+
|
590
|
+
/**
|
591
|
+
* Helper for {@code getWindow}.
|
592
|
+
*
|
593
|
+
* @param {!Document} doc Document object to get window for.
|
594
|
+
* @return {!Window} The window associated with the given document.
|
595
|
+
* @private
|
596
|
+
*/
|
597
|
+
goog.dom.getWindow_ = function(doc) {
|
598
|
+
return doc.parentWindow || doc.defaultView;
|
599
|
+
};
|
600
|
+
|
601
|
+
|
602
|
+
/**
|
603
|
+
* Returns a dom node with a set of attributes. This function accepts varargs
|
604
|
+
* for subsequent nodes to be added. Subsequent nodes will be added to the
|
605
|
+
* first node as childNodes.
|
606
|
+
*
|
607
|
+
* So:
|
608
|
+
* <code>createDom('div', null, createDom('p'), createDom('p'));</code>
|
609
|
+
* would return a div with two child paragraphs
|
610
|
+
*
|
611
|
+
* @param {string} tagName Tag to create.
|
612
|
+
* @param {(Object|Array.<string>|string)=} opt_attributes If object, then a map
|
613
|
+
* of name-value pairs for attributes. If a string, then this is the
|
614
|
+
* className of the new element. If an array, the elements will be joined
|
615
|
+
* together as the className of the new element.
|
616
|
+
* @param {...(Object|string|Array|NodeList)} var_args Further DOM nodes or
|
617
|
+
* strings for text nodes. If one of the var_args is an array or NodeList,i
|
618
|
+
* its elements will be added as childNodes instead.
|
619
|
+
* @return {!Element} Reference to a DOM node.
|
620
|
+
*/
|
621
|
+
goog.dom.createDom = function(tagName, opt_attributes, var_args) {
|
622
|
+
return goog.dom.createDom_(document, arguments);
|
623
|
+
};
|
624
|
+
|
625
|
+
|
626
|
+
/**
|
627
|
+
* Helper for {@code createDom}.
|
628
|
+
* @param {!Document} doc The document to create the DOM in.
|
629
|
+
* @param {!Arguments} args Argument object passed from the callers. See
|
630
|
+
* {@code goog.dom.createDom} for details.
|
631
|
+
* @return {!Element} Reference to a DOM node.
|
632
|
+
* @private
|
633
|
+
*/
|
634
|
+
goog.dom.createDom_ = function(doc, args) {
|
635
|
+
var tagName = args[0];
|
636
|
+
var attributes = args[1];
|
637
|
+
|
638
|
+
// Internet Explorer is dumb: http://msdn.microsoft.com/workshop/author/
|
639
|
+
// dhtml/reference/properties/name_2.asp
|
640
|
+
// Also does not allow setting of 'type' attribute on 'input' or 'button'.
|
641
|
+
if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && attributes &&
|
642
|
+
(attributes.name || attributes.type)) {
|
643
|
+
var tagNameArr = ['<', tagName];
|
644
|
+
if (attributes.name) {
|
645
|
+
tagNameArr.push(' name="', goog.string.htmlEscape(attributes.name),
|
646
|
+
'"');
|
647
|
+
}
|
648
|
+
if (attributes.type) {
|
649
|
+
tagNameArr.push(' type="', goog.string.htmlEscape(attributes.type),
|
650
|
+
'"');
|
651
|
+
|
652
|
+
// Clone attributes map to remove 'type' without mutating the input.
|
653
|
+
var clone = {};
|
654
|
+
goog.object.extend(clone, attributes);
|
655
|
+
|
656
|
+
// JSCompiler can't see how goog.object.extend added this property,
|
657
|
+
// because it was essentially added by reflection.
|
658
|
+
// So it needs to be quoted.
|
659
|
+
delete clone['type'];
|
660
|
+
|
661
|
+
attributes = clone;
|
662
|
+
}
|
663
|
+
tagNameArr.push('>');
|
664
|
+
tagName = tagNameArr.join('');
|
665
|
+
}
|
666
|
+
|
667
|
+
var element = doc.createElement(tagName);
|
668
|
+
|
669
|
+
if (attributes) {
|
670
|
+
if (goog.isString(attributes)) {
|
671
|
+
element.className = attributes;
|
672
|
+
} else if (goog.isArray(attributes)) {
|
673
|
+
goog.dom.classes.add.apply(null, [element].concat(attributes));
|
674
|
+
} else {
|
675
|
+
goog.dom.setProperties(element, attributes);
|
676
|
+
}
|
677
|
+
}
|
678
|
+
|
679
|
+
if (args.length > 2) {
|
680
|
+
goog.dom.append_(doc, element, args, 2);
|
681
|
+
}
|
682
|
+
|
683
|
+
return element;
|
684
|
+
};
|
685
|
+
|
686
|
+
|
687
|
+
/**
|
688
|
+
* Appends a node with text or other nodes.
|
689
|
+
* @param {!Document} doc The document to create new nodes in.
|
690
|
+
* @param {!Node} parent The node to append nodes to.
|
691
|
+
* @param {!Arguments} args The values to add. See {@code goog.dom.append}.
|
692
|
+
* @param {number} startIndex The index of the array to start from.
|
693
|
+
* @private
|
694
|
+
*/
|
695
|
+
goog.dom.append_ = function(doc, parent, args, startIndex) {
|
696
|
+
function childHandler(child) {
|
697
|
+
// TODO(user): More coercion, ala MochiKit?
|
698
|
+
if (child) {
|
699
|
+
parent.appendChild(goog.isString(child) ?
|
700
|
+
doc.createTextNode(child) : child);
|
701
|
+
}
|
702
|
+
}
|
703
|
+
|
704
|
+
for (var i = startIndex; i < args.length; i++) {
|
705
|
+
var arg = args[i];
|
706
|
+
// TODO(attila): Fix isArrayLike to return false for a text node.
|
707
|
+
if (goog.isArrayLike(arg) && !goog.dom.isNodeLike(arg)) {
|
708
|
+
// If the argument is a node list, not a real array, use a clone,
|
709
|
+
// because forEach can't be used to mutate a NodeList.
|
710
|
+
goog.array.forEach(goog.dom.isNodeList(arg) ?
|
711
|
+
goog.array.toArray(arg) : arg,
|
712
|
+
childHandler);
|
713
|
+
} else {
|
714
|
+
childHandler(arg);
|
715
|
+
}
|
716
|
+
}
|
717
|
+
};
|
718
|
+
|
719
|
+
|
720
|
+
/**
|
721
|
+
* Alias for {@code createDom}.
|
722
|
+
* @param {string} tagName Tag to create.
|
723
|
+
* @param {(string|Object)=} opt_attributes If object, then a map of name-value
|
724
|
+
* pairs for attributes. If a string, then this is the className of the new
|
725
|
+
* element.
|
726
|
+
* @param {...(Object|string|Array|NodeList)} var_args Further DOM nodes or
|
727
|
+
* strings for text nodes. If one of the var_args is an array, its
|
728
|
+
* children will be added as childNodes instead.
|
729
|
+
* @return {!Element} Reference to a DOM node.
|
730
|
+
* @deprecated Use {@link goog.dom.createDom} instead.
|
731
|
+
*/
|
732
|
+
goog.dom.$dom = goog.dom.createDom;
|
733
|
+
|
734
|
+
|
735
|
+
/**
|
736
|
+
* Creates a new element.
|
737
|
+
* @param {string} name Tag name.
|
738
|
+
* @return {!Element} The new element.
|
739
|
+
*/
|
740
|
+
goog.dom.createElement = function(name) {
|
741
|
+
return document.createElement(name);
|
742
|
+
};
|
743
|
+
|
744
|
+
|
745
|
+
/**
|
746
|
+
* Creates a new text node.
|
747
|
+
* @param {number|string} content Content.
|
748
|
+
* @return {!Text} The new text node.
|
749
|
+
*/
|
750
|
+
goog.dom.createTextNode = function(content) {
|
751
|
+
return document.createTextNode(String(content));
|
752
|
+
};
|
753
|
+
|
754
|
+
|
755
|
+
/**
|
756
|
+
* Create a table.
|
757
|
+
* @param {number} rows The number of rows in the table. Must be >= 1.
|
758
|
+
* @param {number} columns The number of columns in the table. Must be >= 1.
|
759
|
+
* @param {boolean=} opt_fillWithNbsp If true, fills table entries with nsbps.
|
760
|
+
* @return {!Element} The created table.
|
761
|
+
*/
|
762
|
+
goog.dom.createTable = function(rows, columns, opt_fillWithNbsp) {
|
763
|
+
return goog.dom.createTable_(document, rows, columns, !!opt_fillWithNbsp);
|
764
|
+
};
|
765
|
+
|
766
|
+
|
767
|
+
/**
|
768
|
+
* Create a table.
|
769
|
+
* @param {!Document} doc Document object to use to create the table.
|
770
|
+
* @param {number} rows The number of rows in the table. Must be >= 1.
|
771
|
+
* @param {number} columns The number of columns in the table. Must be >= 1.
|
772
|
+
* @param {boolean} fillWithNbsp If true, fills table entries with nsbps.
|
773
|
+
* @return {!Element} The created table.
|
774
|
+
* @private
|
775
|
+
*/
|
776
|
+
goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) {
|
777
|
+
var rowHtml = ['<tr>'];
|
778
|
+
for (var i = 0; i < columns; i++) {
|
779
|
+
rowHtml.push(fillWithNbsp ? '<td> </td>' : '<td></td>');
|
780
|
+
}
|
781
|
+
rowHtml.push('</tr>');
|
782
|
+
rowHtml = rowHtml.join('');
|
783
|
+
var totalHtml = ['<table>'];
|
784
|
+
for (i = 0; i < rows; i++) {
|
785
|
+
totalHtml.push(rowHtml);
|
786
|
+
}
|
787
|
+
totalHtml.push('</table>');
|
788
|
+
|
789
|
+
var elem = doc.createElement(goog.dom.TagName.DIV);
|
790
|
+
elem.innerHTML = totalHtml.join('');
|
791
|
+
return /** @type {!Element} */ (elem.removeChild(elem.firstChild));
|
792
|
+
};
|
793
|
+
|
794
|
+
|
795
|
+
/**
|
796
|
+
* Converts an HTML string into a document fragment. The string must be
|
797
|
+
* sanitized in order to avoid cross-site scripting. For example
|
798
|
+
* {@code goog.dom.htmlToDocumentFragment('<img src=x onerror=alert(0)>')}
|
799
|
+
* triggers an alert in all browsers, even if the returned document fragment
|
800
|
+
* is thrown away immediately.
|
801
|
+
*
|
802
|
+
* @param {string} htmlString The HTML string to convert.
|
803
|
+
* @return {!Node} The resulting document fragment.
|
804
|
+
*/
|
805
|
+
goog.dom.htmlToDocumentFragment = function(htmlString) {
|
806
|
+
return goog.dom.htmlToDocumentFragment_(document, htmlString);
|
807
|
+
};
|
808
|
+
|
809
|
+
|
810
|
+
/**
|
811
|
+
* Helper for {@code htmlToDocumentFragment}.
|
812
|
+
*
|
813
|
+
* @param {!Document} doc The document.
|
814
|
+
* @param {string} htmlString The HTML string to convert.
|
815
|
+
* @return {!Node} The resulting document fragment.
|
816
|
+
* @private
|
817
|
+
*/
|
818
|
+
goog.dom.htmlToDocumentFragment_ = function(doc, htmlString) {
|
819
|
+
var tempDiv = doc.createElement('div');
|
820
|
+
if (goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
|
821
|
+
tempDiv.innerHTML = '<br>' + htmlString;
|
822
|
+
tempDiv.removeChild(tempDiv.firstChild);
|
823
|
+
} else {
|
824
|
+
tempDiv.innerHTML = htmlString;
|
825
|
+
}
|
826
|
+
if (tempDiv.childNodes.length == 1) {
|
827
|
+
return /** @type {!Node} */ (tempDiv.removeChild(tempDiv.firstChild));
|
828
|
+
} else {
|
829
|
+
var fragment = doc.createDocumentFragment();
|
830
|
+
while (tempDiv.firstChild) {
|
831
|
+
fragment.appendChild(tempDiv.firstChild);
|
832
|
+
}
|
833
|
+
return fragment;
|
834
|
+
}
|
835
|
+
};
|
836
|
+
|
837
|
+
|
838
|
+
/**
|
839
|
+
* Returns the compatMode of the document.
|
840
|
+
* @return {string} The result is either CSS1Compat or BackCompat.
|
841
|
+
* @deprecated use goog.dom.isCss1CompatMode instead.
|
842
|
+
*/
|
843
|
+
goog.dom.getCompatMode = function() {
|
844
|
+
return goog.dom.isCss1CompatMode() ? 'CSS1Compat' : 'BackCompat';
|
845
|
+
};
|
846
|
+
|
847
|
+
|
848
|
+
/**
|
849
|
+
* Returns true if the browser is in "CSS1-compatible" (standards-compliant)
|
850
|
+
* mode, false otherwise.
|
851
|
+
* @return {boolean} True if in CSS1-compatible mode.
|
852
|
+
*/
|
853
|
+
goog.dom.isCss1CompatMode = function() {
|
854
|
+
return goog.dom.isCss1CompatMode_(document);
|
855
|
+
};
|
856
|
+
|
857
|
+
|
858
|
+
/**
|
859
|
+
* Returns true if the browser is in "CSS1-compatible" (standards-compliant)
|
860
|
+
* mode, false otherwise.
|
861
|
+
* @param {Document} doc The document to check.
|
862
|
+
* @return {boolean} True if in CSS1-compatible mode.
|
863
|
+
* @private
|
864
|
+
*/
|
865
|
+
goog.dom.isCss1CompatMode_ = function(doc) {
|
866
|
+
if (goog.dom.COMPAT_MODE_KNOWN_) {
|
867
|
+
return goog.dom.ASSUME_STANDARDS_MODE;
|
868
|
+
}
|
869
|
+
|
870
|
+
return doc.compatMode == 'CSS1Compat';
|
871
|
+
};
|
872
|
+
|
873
|
+
|
874
|
+
/**
|
875
|
+
* Determines if the given node can contain children, intended to be used for
|
876
|
+
* HTML generation.
|
877
|
+
*
|
878
|
+
* IE natively supports node.canHaveChildren but has inconsistent behavior.
|
879
|
+
* Prior to IE8 the base tag allows children and in IE9 all nodes return true
|
880
|
+
* for canHaveChildren.
|
881
|
+
*
|
882
|
+
* In practice all non-IE browsers allow you to add children to any node, but
|
883
|
+
* the behavior is inconsistent:
|
884
|
+
*
|
885
|
+
* <pre>
|
886
|
+
* var a = document.createElement('br');
|
887
|
+
* a.appendChild(document.createTextNode('foo'));
|
888
|
+
* a.appendChild(document.createTextNode('bar'));
|
889
|
+
* console.log(a.childNodes.length); // 2
|
890
|
+
* console.log(a.innerHTML); // Chrome: "", IE9: "foobar", FF3.5: "foobar"
|
891
|
+
* </pre>
|
892
|
+
*
|
893
|
+
* For more information, see:
|
894
|
+
* http://dev.w3.org/html5/markup/syntax.html#syntax-elements
|
895
|
+
*
|
896
|
+
* TODO(user): Rename shouldAllowChildren() ?
|
897
|
+
*
|
898
|
+
* @param {Node} node The node to check.
|
899
|
+
* @return {boolean} Whether the node can contain children.
|
900
|
+
*/
|
901
|
+
goog.dom.canHaveChildren = function(node) {
|
902
|
+
if (node.nodeType != goog.dom.NodeType.ELEMENT) {
|
903
|
+
return false;
|
904
|
+
}
|
905
|
+
switch (node.tagName) {
|
906
|
+
case goog.dom.TagName.APPLET:
|
907
|
+
case goog.dom.TagName.AREA:
|
908
|
+
case goog.dom.TagName.BASE:
|
909
|
+
case goog.dom.TagName.BR:
|
910
|
+
case goog.dom.TagName.COL:
|
911
|
+
case goog.dom.TagName.COMMAND:
|
912
|
+
case goog.dom.TagName.EMBED:
|
913
|
+
case goog.dom.TagName.FRAME:
|
914
|
+
case goog.dom.TagName.HR:
|
915
|
+
case goog.dom.TagName.IMG:
|
916
|
+
case goog.dom.TagName.INPUT:
|
917
|
+
case goog.dom.TagName.IFRAME:
|
918
|
+
case goog.dom.TagName.ISINDEX:
|
919
|
+
case goog.dom.TagName.KEYGEN:
|
920
|
+
case goog.dom.TagName.LINK:
|
921
|
+
case goog.dom.TagName.NOFRAMES:
|
922
|
+
case goog.dom.TagName.NOSCRIPT:
|
923
|
+
case goog.dom.TagName.META:
|
924
|
+
case goog.dom.TagName.OBJECT:
|
925
|
+
case goog.dom.TagName.PARAM:
|
926
|
+
case goog.dom.TagName.SCRIPT:
|
927
|
+
case goog.dom.TagName.SOURCE:
|
928
|
+
case goog.dom.TagName.STYLE:
|
929
|
+
case goog.dom.TagName.TRACK:
|
930
|
+
case goog.dom.TagName.WBR:
|
931
|
+
return false;
|
932
|
+
}
|
933
|
+
return true;
|
934
|
+
};
|
935
|
+
|
936
|
+
|
937
|
+
/**
|
938
|
+
* Appends a child to a node.
|
939
|
+
* @param {Node} parent Parent.
|
940
|
+
* @param {Node} child Child.
|
941
|
+
*/
|
942
|
+
goog.dom.appendChild = function(parent, child) {
|
943
|
+
parent.appendChild(child);
|
944
|
+
};
|
945
|
+
|
946
|
+
|
947
|
+
/**
|
948
|
+
* Appends a node with text or other nodes.
|
949
|
+
* @param {!Node} parent The node to append nodes to.
|
950
|
+
* @param {...goog.dom.Appendable} var_args The things to append to the node.
|
951
|
+
* If this is a Node it is appended as is.
|
952
|
+
* If this is a string then a text node is appended.
|
953
|
+
* If this is an array like object then fields 0 to length - 1 are appended.
|
954
|
+
*/
|
955
|
+
goog.dom.append = function(parent, var_args) {
|
956
|
+
goog.dom.append_(goog.dom.getOwnerDocument(parent), parent, arguments, 1);
|
957
|
+
};
|
958
|
+
|
959
|
+
|
960
|
+
/**
|
961
|
+
* Removes all the child nodes on a DOM node.
|
962
|
+
* @param {Node} node Node to remove children from.
|
963
|
+
*/
|
964
|
+
goog.dom.removeChildren = function(node) {
|
965
|
+
// Note: Iterations over live collections can be slow, this is the fastest
|
966
|
+
// we could find. The double parenthesis are used to prevent JsCompiler and
|
967
|
+
// strict warnings.
|
968
|
+
var child;
|
969
|
+
while ((child = node.firstChild)) {
|
970
|
+
node.removeChild(child);
|
971
|
+
}
|
972
|
+
};
|
973
|
+
|
974
|
+
|
975
|
+
/**
|
976
|
+
* Inserts a new node before an existing reference node (i.e. as the previous
|
977
|
+
* sibling). If the reference node has no parent, then does nothing.
|
978
|
+
* @param {Node} newNode Node to insert.
|
979
|
+
* @param {Node} refNode Reference node to insert before.
|
980
|
+
*/
|
981
|
+
goog.dom.insertSiblingBefore = function(newNode, refNode) {
|
982
|
+
if (refNode.parentNode) {
|
983
|
+
refNode.parentNode.insertBefore(newNode, refNode);
|
984
|
+
}
|
985
|
+
};
|
986
|
+
|
987
|
+
|
988
|
+
/**
|
989
|
+
* Inserts a new node after an existing reference node (i.e. as the next
|
990
|
+
* sibling). If the reference node has no parent, then does nothing.
|
991
|
+
* @param {Node} newNode Node to insert.
|
992
|
+
* @param {Node} refNode Reference node to insert after.
|
993
|
+
*/
|
994
|
+
goog.dom.insertSiblingAfter = function(newNode, refNode) {
|
995
|
+
if (refNode.parentNode) {
|
996
|
+
refNode.parentNode.insertBefore(newNode, refNode.nextSibling);
|
997
|
+
}
|
998
|
+
};
|
999
|
+
|
1000
|
+
|
1001
|
+
/**
|
1002
|
+
* Insert a child at a given index. If index is larger than the number of child
|
1003
|
+
* nodes that the parent currently has, the node is inserted as the last child
|
1004
|
+
* node.
|
1005
|
+
* @param {Element} parent The element into which to insert the child.
|
1006
|
+
* @param {Node} child The element to insert.
|
1007
|
+
* @param {number} index The index at which to insert the new child node. Must
|
1008
|
+
* not be negative.
|
1009
|
+
*/
|
1010
|
+
goog.dom.insertChildAt = function(parent, child, index) {
|
1011
|
+
// Note that if the second argument is null, insertBefore
|
1012
|
+
// will append the child at the end of the list of children.
|
1013
|
+
parent.insertBefore(child, parent.childNodes[index] || null);
|
1014
|
+
};
|
1015
|
+
|
1016
|
+
|
1017
|
+
/**
|
1018
|
+
* Removes a node from its parent.
|
1019
|
+
* @param {Node} node The node to remove.
|
1020
|
+
* @return {Node} The node removed if removed; else, null.
|
1021
|
+
*/
|
1022
|
+
goog.dom.removeNode = function(node) {
|
1023
|
+
return node && node.parentNode ? node.parentNode.removeChild(node) : null;
|
1024
|
+
};
|
1025
|
+
|
1026
|
+
|
1027
|
+
/**
|
1028
|
+
* Replaces a node in the DOM tree. Will do nothing if {@code oldNode} has no
|
1029
|
+
* parent.
|
1030
|
+
* @param {Node} newNode Node to insert.
|
1031
|
+
* @param {Node} oldNode Node to replace.
|
1032
|
+
*/
|
1033
|
+
goog.dom.replaceNode = function(newNode, oldNode) {
|
1034
|
+
var parent = oldNode.parentNode;
|
1035
|
+
if (parent) {
|
1036
|
+
parent.replaceChild(newNode, oldNode);
|
1037
|
+
}
|
1038
|
+
};
|
1039
|
+
|
1040
|
+
|
1041
|
+
/**
|
1042
|
+
* Flattens an element. That is, removes it and replace it with its children.
|
1043
|
+
* Does nothing if the element is not in the document.
|
1044
|
+
* @param {Element} element The element to flatten.
|
1045
|
+
* @return {Element|undefined} The original element, detached from the document
|
1046
|
+
* tree, sans children; or undefined, if the element was not in the document
|
1047
|
+
* to begin with.
|
1048
|
+
*/
|
1049
|
+
goog.dom.flattenElement = function(element) {
|
1050
|
+
var child, parent = element.parentNode;
|
1051
|
+
if (parent && parent.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
|
1052
|
+
// Use IE DOM method (supported by Opera too) if available
|
1053
|
+
if (element.removeNode) {
|
1054
|
+
return /** @type {Element} */ (element.removeNode(false));
|
1055
|
+
} else {
|
1056
|
+
// Move all children of the original node up one level.
|
1057
|
+
while ((child = element.firstChild)) {
|
1058
|
+
parent.insertBefore(child, element);
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
// Detach the original element.
|
1062
|
+
return /** @type {Element} */ (goog.dom.removeNode(element));
|
1063
|
+
}
|
1064
|
+
}
|
1065
|
+
};
|
1066
|
+
|
1067
|
+
|
1068
|
+
/**
|
1069
|
+
* Returns an array containing just the element children of the given element.
|
1070
|
+
* @param {Element} element The element whose element children we want.
|
1071
|
+
* @return {!(Array|NodeList)} An array or array-like list of just the element
|
1072
|
+
* children of the given element.
|
1073
|
+
*/
|
1074
|
+
goog.dom.getChildren = function(element) {
|
1075
|
+
// We check if the children attribute is supported for child elements
|
1076
|
+
// since IE8 misuses the attribute by also including comments.
|
1077
|
+
if (goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE &&
|
1078
|
+
element.children != undefined) {
|
1079
|
+
return element.children;
|
1080
|
+
}
|
1081
|
+
// Fall back to manually filtering the element's child nodes.
|
1082
|
+
return goog.array.filter(element.childNodes, function(node) {
|
1083
|
+
return node.nodeType == goog.dom.NodeType.ELEMENT;
|
1084
|
+
});
|
1085
|
+
};
|
1086
|
+
|
1087
|
+
|
1088
|
+
/**
|
1089
|
+
* Returns the first child node that is an element.
|
1090
|
+
* @param {Node} node The node to get the first child element of.
|
1091
|
+
* @return {Element} The first child node of {@code node} that is an element.
|
1092
|
+
*/
|
1093
|
+
goog.dom.getFirstElementChild = function(node) {
|
1094
|
+
if (node.firstElementChild != undefined) {
|
1095
|
+
return /** @type {Element} */(node).firstElementChild;
|
1096
|
+
}
|
1097
|
+
return goog.dom.getNextElementNode_(node.firstChild, true);
|
1098
|
+
};
|
1099
|
+
|
1100
|
+
|
1101
|
+
/**
|
1102
|
+
* Returns the last child node that is an element.
|
1103
|
+
* @param {Node} node The node to get the last child element of.
|
1104
|
+
* @return {Element} The last child node of {@code node} that is an element.
|
1105
|
+
*/
|
1106
|
+
goog.dom.getLastElementChild = function(node) {
|
1107
|
+
if (node.lastElementChild != undefined) {
|
1108
|
+
return /** @type {Element} */(node).lastElementChild;
|
1109
|
+
}
|
1110
|
+
return goog.dom.getNextElementNode_(node.lastChild, false);
|
1111
|
+
};
|
1112
|
+
|
1113
|
+
|
1114
|
+
/**
|
1115
|
+
* Returns the first next sibling that is an element.
|
1116
|
+
* @param {Node} node The node to get the next sibling element of.
|
1117
|
+
* @return {Element} The next sibling of {@code node} that is an element.
|
1118
|
+
*/
|
1119
|
+
goog.dom.getNextElementSibling = function(node) {
|
1120
|
+
if (node.nextElementSibling != undefined) {
|
1121
|
+
return /** @type {Element} */(node).nextElementSibling;
|
1122
|
+
}
|
1123
|
+
return goog.dom.getNextElementNode_(node.nextSibling, true);
|
1124
|
+
};
|
1125
|
+
|
1126
|
+
|
1127
|
+
/**
|
1128
|
+
* Returns the first previous sibling that is an element.
|
1129
|
+
* @param {Node} node The node to get the previous sibling element of.
|
1130
|
+
* @return {Element} The first previous sibling of {@code node} that is
|
1131
|
+
* an element.
|
1132
|
+
*/
|
1133
|
+
goog.dom.getPreviousElementSibling = function(node) {
|
1134
|
+
if (node.previousElementSibling != undefined) {
|
1135
|
+
return /** @type {Element} */(node).previousElementSibling;
|
1136
|
+
}
|
1137
|
+
return goog.dom.getNextElementNode_(node.previousSibling, false);
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
|
1141
|
+
/**
|
1142
|
+
* Returns the first node that is an element in the specified direction,
|
1143
|
+
* starting with {@code node}.
|
1144
|
+
* @param {Node} node The node to get the next element from.
|
1145
|
+
* @param {boolean} forward Whether to look forwards or backwards.
|
1146
|
+
* @return {Element} The first element.
|
1147
|
+
* @private
|
1148
|
+
*/
|
1149
|
+
goog.dom.getNextElementNode_ = function(node, forward) {
|
1150
|
+
while (node && node.nodeType != goog.dom.NodeType.ELEMENT) {
|
1151
|
+
node = forward ? node.nextSibling : node.previousSibling;
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
return /** @type {Element} */ (node);
|
1155
|
+
};
|
1156
|
+
|
1157
|
+
|
1158
|
+
/**
|
1159
|
+
* Returns the next node in source order from the given node.
|
1160
|
+
* @param {Node} node The node.
|
1161
|
+
* @return {Node} The next node in the DOM tree, or null if this was the last
|
1162
|
+
* node.
|
1163
|
+
*/
|
1164
|
+
goog.dom.getNextNode = function(node) {
|
1165
|
+
if (!node) {
|
1166
|
+
return null;
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
if (node.firstChild) {
|
1170
|
+
return node.firstChild;
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
while (node && !node.nextSibling) {
|
1174
|
+
node = node.parentNode;
|
1175
|
+
}
|
1176
|
+
|
1177
|
+
return node ? node.nextSibling : null;
|
1178
|
+
};
|
1179
|
+
|
1180
|
+
|
1181
|
+
/**
|
1182
|
+
* Returns the previous node in source order from the given node.
|
1183
|
+
* @param {Node} node The node.
|
1184
|
+
* @return {Node} The previous node in the DOM tree, or null if this was the
|
1185
|
+
* first node.
|
1186
|
+
*/
|
1187
|
+
goog.dom.getPreviousNode = function(node) {
|
1188
|
+
if (!node) {
|
1189
|
+
return null;
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
if (!node.previousSibling) {
|
1193
|
+
return node.parentNode;
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
node = node.previousSibling;
|
1197
|
+
while (node && node.lastChild) {
|
1198
|
+
node = node.lastChild;
|
1199
|
+
}
|
1200
|
+
|
1201
|
+
return node;
|
1202
|
+
};
|
1203
|
+
|
1204
|
+
|
1205
|
+
/**
|
1206
|
+
* Whether the object looks like a DOM node.
|
1207
|
+
* @param {*} obj The object being tested for node likeness.
|
1208
|
+
* @return {boolean} Whether the object looks like a DOM node.
|
1209
|
+
*/
|
1210
|
+
goog.dom.isNodeLike = function(obj) {
|
1211
|
+
return goog.isObject(obj) && obj.nodeType > 0;
|
1212
|
+
};
|
1213
|
+
|
1214
|
+
|
1215
|
+
/**
|
1216
|
+
* Whether the object looks like an Element.
|
1217
|
+
* @param {*} obj The object being tested for Element likeness.
|
1218
|
+
* @return {boolean} Whether the object looks like an Element.
|
1219
|
+
*/
|
1220
|
+
goog.dom.isElement = function(obj) {
|
1221
|
+
return goog.isObject(obj) && obj.nodeType == goog.dom.NodeType.ELEMENT;
|
1222
|
+
};
|
1223
|
+
|
1224
|
+
|
1225
|
+
/**
|
1226
|
+
* Returns true if the specified value is a Window object. This includes the
|
1227
|
+
* global window for HTML pages, and iframe windows.
|
1228
|
+
* @param {*} obj Variable to test.
|
1229
|
+
* @return {boolean} Whether the variable is a window.
|
1230
|
+
*/
|
1231
|
+
goog.dom.isWindow = function(obj) {
|
1232
|
+
return goog.isObject(obj) && obj['window'] == obj;
|
1233
|
+
};
|
1234
|
+
|
1235
|
+
|
1236
|
+
/**
|
1237
|
+
* Returns an element's parent, if it's an Element.
|
1238
|
+
* @param {Element} element The DOM element.
|
1239
|
+
* @return {Element} The parent, or null if not an Element.
|
1240
|
+
*/
|
1241
|
+
goog.dom.getParentElement = function(element) {
|
1242
|
+
if (goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
|
1243
|
+
var isIe9 = goog.userAgent.IE &&
|
1244
|
+
goog.userAgent.isVersionOrHigher('9') &&
|
1245
|
+
!goog.userAgent.isVersionOrHigher('10');
|
1246
|
+
// SVG elements in IE9 can't use the parentElement property.
|
1247
|
+
// goog.global['SVGElement'] is not defined in IE9 quirks mode.
|
1248
|
+
if (!(isIe9 && goog.global['SVGElement'] &&
|
1249
|
+
element instanceof goog.global['SVGElement'])) {
|
1250
|
+
return element.parentElement;
|
1251
|
+
}
|
1252
|
+
}
|
1253
|
+
var parent = element.parentNode;
|
1254
|
+
return goog.dom.isElement(parent) ? /** @type {!Element} */ (parent) : null;
|
1255
|
+
};
|
1256
|
+
|
1257
|
+
|
1258
|
+
/**
|
1259
|
+
* Whether a node contains another node.
|
1260
|
+
* @param {Node} parent The node that should contain the other node.
|
1261
|
+
* @param {Node} descendant The node to test presence of.
|
1262
|
+
* @return {boolean} Whether the parent node contains the descendent node.
|
1263
|
+
*/
|
1264
|
+
goog.dom.contains = function(parent, descendant) {
|
1265
|
+
// We use browser specific methods for this if available since it is faster
|
1266
|
+
// that way.
|
1267
|
+
|
1268
|
+
// IE DOM
|
1269
|
+
if (parent.contains && descendant.nodeType == goog.dom.NodeType.ELEMENT) {
|
1270
|
+
return parent == descendant || parent.contains(descendant);
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
// W3C DOM Level 3
|
1274
|
+
if (typeof parent.compareDocumentPosition != 'undefined') {
|
1275
|
+
return parent == descendant ||
|
1276
|
+
Boolean(parent.compareDocumentPosition(descendant) & 16);
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
// W3C DOM Level 1
|
1280
|
+
while (descendant && parent != descendant) {
|
1281
|
+
descendant = descendant.parentNode;
|
1282
|
+
}
|
1283
|
+
return descendant == parent;
|
1284
|
+
};
|
1285
|
+
|
1286
|
+
|
1287
|
+
/**
|
1288
|
+
* Compares the document order of two nodes, returning 0 if they are the same
|
1289
|
+
* node, a negative number if node1 is before node2, and a positive number if
|
1290
|
+
* node2 is before node1. Note that we compare the order the tags appear in the
|
1291
|
+
* document so in the tree <b><i>text</i></b> the B node is considered to be
|
1292
|
+
* before the I node.
|
1293
|
+
*
|
1294
|
+
* @param {Node} node1 The first node to compare.
|
1295
|
+
* @param {Node} node2 The second node to compare.
|
1296
|
+
* @return {number} 0 if the nodes are the same node, a negative number if node1
|
1297
|
+
* is before node2, and a positive number if node2 is before node1.
|
1298
|
+
*/
|
1299
|
+
goog.dom.compareNodeOrder = function(node1, node2) {
|
1300
|
+
// Fall out quickly for equality.
|
1301
|
+
if (node1 == node2) {
|
1302
|
+
return 0;
|
1303
|
+
}
|
1304
|
+
|
1305
|
+
// Use compareDocumentPosition where available
|
1306
|
+
if (node1.compareDocumentPosition) {
|
1307
|
+
// 4 is the bitmask for FOLLOWS.
|
1308
|
+
return node1.compareDocumentPosition(node2) & 2 ? 1 : -1;
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
// Special case for document nodes on IE 7 and 8.
|
1312
|
+
if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
|
1313
|
+
if (node1.nodeType == goog.dom.NodeType.DOCUMENT) {
|
1314
|
+
return -1;
|
1315
|
+
}
|
1316
|
+
if (node2.nodeType == goog.dom.NodeType.DOCUMENT) {
|
1317
|
+
return 1;
|
1318
|
+
}
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
// Process in IE using sourceIndex - we check to see if the first node has
|
1322
|
+
// a source index or if its parent has one.
|
1323
|
+
if ('sourceIndex' in node1 ||
|
1324
|
+
(node1.parentNode && 'sourceIndex' in node1.parentNode)) {
|
1325
|
+
var isElement1 = node1.nodeType == goog.dom.NodeType.ELEMENT;
|
1326
|
+
var isElement2 = node2.nodeType == goog.dom.NodeType.ELEMENT;
|
1327
|
+
|
1328
|
+
if (isElement1 && isElement2) {
|
1329
|
+
return node1.sourceIndex - node2.sourceIndex;
|
1330
|
+
} else {
|
1331
|
+
var parent1 = node1.parentNode;
|
1332
|
+
var parent2 = node2.parentNode;
|
1333
|
+
|
1334
|
+
if (parent1 == parent2) {
|
1335
|
+
return goog.dom.compareSiblingOrder_(node1, node2);
|
1336
|
+
}
|
1337
|
+
|
1338
|
+
if (!isElement1 && goog.dom.contains(parent1, node2)) {
|
1339
|
+
return -1 * goog.dom.compareParentsDescendantNodeIe_(node1, node2);
|
1340
|
+
}
|
1341
|
+
|
1342
|
+
|
1343
|
+
if (!isElement2 && goog.dom.contains(parent2, node1)) {
|
1344
|
+
return goog.dom.compareParentsDescendantNodeIe_(node2, node1);
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
return (isElement1 ? node1.sourceIndex : parent1.sourceIndex) -
|
1348
|
+
(isElement2 ? node2.sourceIndex : parent2.sourceIndex);
|
1349
|
+
}
|
1350
|
+
}
|
1351
|
+
|
1352
|
+
// For Safari, we compare ranges.
|
1353
|
+
var doc = goog.dom.getOwnerDocument(node1);
|
1354
|
+
|
1355
|
+
var range1, range2;
|
1356
|
+
range1 = doc.createRange();
|
1357
|
+
range1.selectNode(node1);
|
1358
|
+
range1.collapse(true);
|
1359
|
+
|
1360
|
+
range2 = doc.createRange();
|
1361
|
+
range2.selectNode(node2);
|
1362
|
+
range2.collapse(true);
|
1363
|
+
|
1364
|
+
return range1.compareBoundaryPoints(goog.global['Range'].START_TO_END,
|
1365
|
+
range2);
|
1366
|
+
};
|
1367
|
+
|
1368
|
+
|
1369
|
+
/**
|
1370
|
+
* Utility function to compare the position of two nodes, when
|
1371
|
+
* {@code textNode}'s parent is an ancestor of {@code node}. If this entry
|
1372
|
+
* condition is not met, this function will attempt to reference a null object.
|
1373
|
+
* @param {Node} textNode The textNode to compare.
|
1374
|
+
* @param {Node} node The node to compare.
|
1375
|
+
* @return {number} -1 if node is before textNode, +1 otherwise.
|
1376
|
+
* @private
|
1377
|
+
*/
|
1378
|
+
goog.dom.compareParentsDescendantNodeIe_ = function(textNode, node) {
|
1379
|
+
var parent = textNode.parentNode;
|
1380
|
+
if (parent == node) {
|
1381
|
+
// If textNode is a child of node, then node comes first.
|
1382
|
+
return -1;
|
1383
|
+
}
|
1384
|
+
var sibling = node;
|
1385
|
+
while (sibling.parentNode != parent) {
|
1386
|
+
sibling = sibling.parentNode;
|
1387
|
+
}
|
1388
|
+
return goog.dom.compareSiblingOrder_(sibling, textNode);
|
1389
|
+
};
|
1390
|
+
|
1391
|
+
|
1392
|
+
/**
|
1393
|
+
* Utility function to compare the position of two nodes known to be non-equal
|
1394
|
+
* siblings.
|
1395
|
+
* @param {Node} node1 The first node to compare.
|
1396
|
+
* @param {Node} node2 The second node to compare.
|
1397
|
+
* @return {number} -1 if node1 is before node2, +1 otherwise.
|
1398
|
+
* @private
|
1399
|
+
*/
|
1400
|
+
goog.dom.compareSiblingOrder_ = function(node1, node2) {
|
1401
|
+
var s = node2;
|
1402
|
+
while ((s = s.previousSibling)) {
|
1403
|
+
if (s == node1) {
|
1404
|
+
// We just found node1 before node2.
|
1405
|
+
return -1;
|
1406
|
+
}
|
1407
|
+
}
|
1408
|
+
|
1409
|
+
// Since we didn't find it, node1 must be after node2.
|
1410
|
+
return 1;
|
1411
|
+
};
|
1412
|
+
|
1413
|
+
|
1414
|
+
/**
|
1415
|
+
* Find the deepest common ancestor of the given nodes.
|
1416
|
+
* @param {...Node} var_args The nodes to find a common ancestor of.
|
1417
|
+
* @return {Node} The common ancestor of the nodes, or null if there is none.
|
1418
|
+
* null will only be returned if two or more of the nodes are from different
|
1419
|
+
* documents.
|
1420
|
+
*/
|
1421
|
+
goog.dom.findCommonAncestor = function(var_args) {
|
1422
|
+
var i, count = arguments.length;
|
1423
|
+
if (!count) {
|
1424
|
+
return null;
|
1425
|
+
} else if (count == 1) {
|
1426
|
+
return arguments[0];
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
var paths = [];
|
1430
|
+
var minLength = Infinity;
|
1431
|
+
for (i = 0; i < count; i++) {
|
1432
|
+
// Compute the list of ancestors.
|
1433
|
+
var ancestors = [];
|
1434
|
+
var node = arguments[i];
|
1435
|
+
while (node) {
|
1436
|
+
ancestors.unshift(node);
|
1437
|
+
node = node.parentNode;
|
1438
|
+
}
|
1439
|
+
|
1440
|
+
// Save the list for comparison.
|
1441
|
+
paths.push(ancestors);
|
1442
|
+
minLength = Math.min(minLength, ancestors.length);
|
1443
|
+
}
|
1444
|
+
var output = null;
|
1445
|
+
for (i = 0; i < minLength; i++) {
|
1446
|
+
var first = paths[0][i];
|
1447
|
+
for (var j = 1; j < count; j++) {
|
1448
|
+
if (first != paths[j][i]) {
|
1449
|
+
return output;
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
output = first;
|
1453
|
+
}
|
1454
|
+
return output;
|
1455
|
+
};
|
1456
|
+
|
1457
|
+
|
1458
|
+
/**
|
1459
|
+
* Returns the owner document for a node.
|
1460
|
+
* @param {Node|Window} node The node to get the document for.
|
1461
|
+
* @return {!Document} The document owning the node.
|
1462
|
+
*/
|
1463
|
+
goog.dom.getOwnerDocument = function(node) {
|
1464
|
+
// TODO(arv): Remove IE5 code.
|
1465
|
+
// IE5 uses document instead of ownerDocument
|
1466
|
+
return /** @type {!Document} */ (
|
1467
|
+
node.nodeType == goog.dom.NodeType.DOCUMENT ? node :
|
1468
|
+
node.ownerDocument || node.document);
|
1469
|
+
};
|
1470
|
+
|
1471
|
+
|
1472
|
+
/**
|
1473
|
+
* Cross-browser function for getting the document element of a frame or iframe.
|
1474
|
+
* @param {Element} frame Frame element.
|
1475
|
+
* @return {!Document} The frame content document.
|
1476
|
+
*/
|
1477
|
+
goog.dom.getFrameContentDocument = function(frame) {
|
1478
|
+
var doc = frame.contentDocument || frame.contentWindow.document;
|
1479
|
+
return doc;
|
1480
|
+
};
|
1481
|
+
|
1482
|
+
|
1483
|
+
/**
|
1484
|
+
* Cross-browser function for getting the window of a frame or iframe.
|
1485
|
+
* @param {Element} frame Frame element.
|
1486
|
+
* @return {Window} The window associated with the given frame.
|
1487
|
+
*/
|
1488
|
+
goog.dom.getFrameContentWindow = function(frame) {
|
1489
|
+
return frame.contentWindow ||
|
1490
|
+
goog.dom.getWindow_(goog.dom.getFrameContentDocument(frame));
|
1491
|
+
};
|
1492
|
+
|
1493
|
+
|
1494
|
+
/**
|
1495
|
+
* Cross-browser function for setting the text content of an element.
|
1496
|
+
* @param {Element} element The element to change the text content of.
|
1497
|
+
* @param {string|number} text The string that should replace the current
|
1498
|
+
* element content.
|
1499
|
+
*/
|
1500
|
+
goog.dom.setTextContent = function(element, text) {
|
1501
|
+
if ('textContent' in element) {
|
1502
|
+
element.textContent = text;
|
1503
|
+
} else if (element.firstChild &&
|
1504
|
+
element.firstChild.nodeType == goog.dom.NodeType.TEXT) {
|
1505
|
+
// If the first child is a text node we just change its data and remove the
|
1506
|
+
// rest of the children.
|
1507
|
+
while (element.lastChild != element.firstChild) {
|
1508
|
+
element.removeChild(element.lastChild);
|
1509
|
+
}
|
1510
|
+
element.firstChild.data = text;
|
1511
|
+
} else {
|
1512
|
+
goog.dom.removeChildren(element);
|
1513
|
+
var doc = goog.dom.getOwnerDocument(element);
|
1514
|
+
element.appendChild(doc.createTextNode(String(text)));
|
1515
|
+
}
|
1516
|
+
};
|
1517
|
+
|
1518
|
+
|
1519
|
+
/**
|
1520
|
+
* Gets the outerHTML of a node, which islike innerHTML, except that it
|
1521
|
+
* actually contains the HTML of the node itself.
|
1522
|
+
* @param {Element} element The element to get the HTML of.
|
1523
|
+
* @return {string} The outerHTML of the given element.
|
1524
|
+
*/
|
1525
|
+
goog.dom.getOuterHtml = function(element) {
|
1526
|
+
// IE, Opera and WebKit all have outerHTML.
|
1527
|
+
if ('outerHTML' in element) {
|
1528
|
+
return element.outerHTML;
|
1529
|
+
} else {
|
1530
|
+
var doc = goog.dom.getOwnerDocument(element);
|
1531
|
+
var div = doc.createElement('div');
|
1532
|
+
div.appendChild(element.cloneNode(true));
|
1533
|
+
return div.innerHTML;
|
1534
|
+
}
|
1535
|
+
};
|
1536
|
+
|
1537
|
+
|
1538
|
+
/**
|
1539
|
+
* Finds the first descendant node that matches the filter function, using
|
1540
|
+
* a depth first search. This function offers the most general purpose way
|
1541
|
+
* of finding a matching element. You may also wish to consider
|
1542
|
+
* {@code goog.dom.query} which can express many matching criteria using
|
1543
|
+
* CSS selector expressions. These expressions often result in a more
|
1544
|
+
* compact representation of the desired result.
|
1545
|
+
* @see goog.dom.query
|
1546
|
+
*
|
1547
|
+
* @param {Node} root The root of the tree to search.
|
1548
|
+
* @param {function(Node) : boolean} p The filter function.
|
1549
|
+
* @return {Node|undefined} The found node or undefined if none is found.
|
1550
|
+
*/
|
1551
|
+
goog.dom.findNode = function(root, p) {
|
1552
|
+
var rv = [];
|
1553
|
+
var found = goog.dom.findNodes_(root, p, rv, true);
|
1554
|
+
return found ? rv[0] : undefined;
|
1555
|
+
};
|
1556
|
+
|
1557
|
+
|
1558
|
+
/**
|
1559
|
+
* Finds all the descendant nodes that match the filter function, using a
|
1560
|
+
* a depth first search. This function offers the most general-purpose way
|
1561
|
+
* of finding a set of matching elements. You may also wish to consider
|
1562
|
+
* {@code goog.dom.query} which can express many matching criteria using
|
1563
|
+
* CSS selector expressions. These expressions often result in a more
|
1564
|
+
* compact representation of the desired result.
|
1565
|
+
|
1566
|
+
* @param {Node} root The root of the tree to search.
|
1567
|
+
* @param {function(Node) : boolean} p The filter function.
|
1568
|
+
* @return {!Array.<!Node>} The found nodes or an empty array if none are found.
|
1569
|
+
*/
|
1570
|
+
goog.dom.findNodes = function(root, p) {
|
1571
|
+
var rv = [];
|
1572
|
+
goog.dom.findNodes_(root, p, rv, false);
|
1573
|
+
return rv;
|
1574
|
+
};
|
1575
|
+
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* Finds the first or all the descendant nodes that match the filter function,
|
1579
|
+
* using a depth first search.
|
1580
|
+
* @param {Node} root The root of the tree to search.
|
1581
|
+
* @param {function(Node) : boolean} p The filter function.
|
1582
|
+
* @param {!Array.<!Node>} rv The found nodes are added to this array.
|
1583
|
+
* @param {boolean} findOne If true we exit after the first found node.
|
1584
|
+
* @return {boolean} Whether the search is complete or not. True in case findOne
|
1585
|
+
* is true and the node is found. False otherwise.
|
1586
|
+
* @private
|
1587
|
+
*/
|
1588
|
+
goog.dom.findNodes_ = function(root, p, rv, findOne) {
|
1589
|
+
if (root != null) {
|
1590
|
+
var child = root.firstChild;
|
1591
|
+
while (child) {
|
1592
|
+
if (p(child)) {
|
1593
|
+
rv.push(child);
|
1594
|
+
if (findOne) {
|
1595
|
+
return true;
|
1596
|
+
}
|
1597
|
+
}
|
1598
|
+
if (goog.dom.findNodes_(child, p, rv, findOne)) {
|
1599
|
+
return true;
|
1600
|
+
}
|
1601
|
+
child = child.nextSibling;
|
1602
|
+
}
|
1603
|
+
}
|
1604
|
+
return false;
|
1605
|
+
};
|
1606
|
+
|
1607
|
+
|
1608
|
+
/**
|
1609
|
+
* Map of tags whose content to ignore when calculating text length.
|
1610
|
+
* @type {Object}
|
1611
|
+
* @private
|
1612
|
+
*/
|
1613
|
+
goog.dom.TAGS_TO_IGNORE_ = {
|
1614
|
+
'SCRIPT': 1,
|
1615
|
+
'STYLE': 1,
|
1616
|
+
'HEAD': 1,
|
1617
|
+
'IFRAME': 1,
|
1618
|
+
'OBJECT': 1
|
1619
|
+
};
|
1620
|
+
|
1621
|
+
|
1622
|
+
/**
|
1623
|
+
* Map of tags which have predefined values with regard to whitespace.
|
1624
|
+
* @type {Object}
|
1625
|
+
* @private
|
1626
|
+
*/
|
1627
|
+
goog.dom.PREDEFINED_TAG_VALUES_ = {'IMG': ' ', 'BR': '\n'};
|
1628
|
+
|
1629
|
+
|
1630
|
+
/**
|
1631
|
+
* Returns true if the element has a tab index that allows it to receive
|
1632
|
+
* keyboard focus (tabIndex >= 0), false otherwise. Note that form elements
|
1633
|
+
* natively support keyboard focus, even if they have no tab index.
|
1634
|
+
* @param {Element} element Element to check.
|
1635
|
+
* @return {boolean} Whether the element has a tab index that allows keyboard
|
1636
|
+
* focus.
|
1637
|
+
* @see http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
1638
|
+
*/
|
1639
|
+
goog.dom.isFocusableTabIndex = function(element) {
|
1640
|
+
// IE returns 0 for an unset tabIndex, so we must use getAttributeNode(),
|
1641
|
+
// which returns an object with a 'specified' property if tabIndex is
|
1642
|
+
// specified. This works on other browsers, too.
|
1643
|
+
var attrNode = element.getAttributeNode('tabindex'); // Must be lowercase!
|
1644
|
+
if (attrNode && attrNode.specified) {
|
1645
|
+
var index = element.tabIndex;
|
1646
|
+
// NOTE: IE9 puts tabIndex in 16-bit int, e.g. -2 is 65534.
|
1647
|
+
return goog.isNumber(index) && index >= 0 && index < 32768;
|
1648
|
+
}
|
1649
|
+
return false;
|
1650
|
+
};
|
1651
|
+
|
1652
|
+
|
1653
|
+
/**
|
1654
|
+
* Enables or disables keyboard focus support on the element via its tab index.
|
1655
|
+
* Only elements for which {@link goog.dom.isFocusableTabIndex} returns true
|
1656
|
+
* (or elements that natively support keyboard focus, like form elements) can
|
1657
|
+
* receive keyboard focus. See http://go/tabindex for more info.
|
1658
|
+
* @param {Element} element Element whose tab index is to be changed.
|
1659
|
+
* @param {boolean} enable Whether to set or remove a tab index on the element
|
1660
|
+
* that supports keyboard focus.
|
1661
|
+
*/
|
1662
|
+
goog.dom.setFocusableTabIndex = function(element, enable) {
|
1663
|
+
if (enable) {
|
1664
|
+
element.tabIndex = 0;
|
1665
|
+
} else {
|
1666
|
+
// Set tabIndex to -1 first, then remove it. This is a workaround for
|
1667
|
+
// Safari (confirmed in version 4 on Windows). When removing the attribute
|
1668
|
+
// without setting it to -1 first, the element remains keyboard focusable
|
1669
|
+
// despite not having a tabIndex attribute anymore.
|
1670
|
+
element.tabIndex = -1;
|
1671
|
+
element.removeAttribute('tabIndex'); // Must be camelCase!
|
1672
|
+
}
|
1673
|
+
};
|
1674
|
+
|
1675
|
+
|
1676
|
+
/**
|
1677
|
+
* Returns the text content of the current node, without markup and invisible
|
1678
|
+
* symbols. New lines are stripped and whitespace is collapsed,
|
1679
|
+
* such that each character would be visible.
|
1680
|
+
*
|
1681
|
+
* In browsers that support it, innerText is used. Other browsers attempt to
|
1682
|
+
* simulate it via node traversal. Line breaks are canonicalized in IE.
|
1683
|
+
*
|
1684
|
+
* @param {Node} node The node from which we are getting content.
|
1685
|
+
* @return {string} The text content.
|
1686
|
+
*/
|
1687
|
+
goog.dom.getTextContent = function(node) {
|
1688
|
+
var textContent;
|
1689
|
+
// Note(arv): IE9, Opera, and Safari 3 support innerText but they include
|
1690
|
+
// text nodes in script tags. So we revert to use a user agent test here.
|
1691
|
+
if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && ('innerText' in node)) {
|
1692
|
+
textContent = goog.string.canonicalizeNewlines(node.innerText);
|
1693
|
+
// Unfortunately .innerText() returns text with ­ symbols
|
1694
|
+
// We need to filter it out and then remove duplicate whitespaces
|
1695
|
+
} else {
|
1696
|
+
var buf = [];
|
1697
|
+
goog.dom.getTextContent_(node, buf, true);
|
1698
|
+
textContent = buf.join('');
|
1699
|
+
}
|
1700
|
+
|
1701
|
+
// Strip ­ entities. goog.format.insertWordBreaks inserts them in Opera.
|
1702
|
+
textContent = textContent.replace(/ \xAD /g, ' ').replace(/\xAD/g, '');
|
1703
|
+
// Strip ​ entities. goog.format.insertWordBreaks inserts them in IE8.
|
1704
|
+
textContent = textContent.replace(/\u200B/g, '');
|
1705
|
+
|
1706
|
+
// Skip this replacement on old browsers with working innerText, which
|
1707
|
+
// automatically turns into ' ' and / +/ into ' ' when reading
|
1708
|
+
// innerText.
|
1709
|
+
if (!goog.dom.BrowserFeature.CAN_USE_INNER_TEXT) {
|
1710
|
+
textContent = textContent.replace(/ +/g, ' ');
|
1711
|
+
}
|
1712
|
+
if (textContent != ' ') {
|
1713
|
+
textContent = textContent.replace(/^\s*/, '');
|
1714
|
+
}
|
1715
|
+
|
1716
|
+
return textContent;
|
1717
|
+
};
|
1718
|
+
|
1719
|
+
|
1720
|
+
/**
|
1721
|
+
* Returns the text content of the current node, without markup.
|
1722
|
+
*
|
1723
|
+
* Unlike {@code getTextContent} this method does not collapse whitespaces
|
1724
|
+
* or normalize lines breaks.
|
1725
|
+
*
|
1726
|
+
* @param {Node} node The node from which we are getting content.
|
1727
|
+
* @return {string} The raw text content.
|
1728
|
+
*/
|
1729
|
+
goog.dom.getRawTextContent = function(node) {
|
1730
|
+
var buf = [];
|
1731
|
+
goog.dom.getTextContent_(node, buf, false);
|
1732
|
+
|
1733
|
+
return buf.join('');
|
1734
|
+
};
|
1735
|
+
|
1736
|
+
|
1737
|
+
/**
|
1738
|
+
* Recursive support function for text content retrieval.
|
1739
|
+
*
|
1740
|
+
* @param {Node} node The node from which we are getting content.
|
1741
|
+
* @param {Array} buf string buffer.
|
1742
|
+
* @param {boolean} normalizeWhitespace Whether to normalize whitespace.
|
1743
|
+
* @private
|
1744
|
+
*/
|
1745
|
+
goog.dom.getTextContent_ = function(node, buf, normalizeWhitespace) {
|
1746
|
+
if (node.nodeName in goog.dom.TAGS_TO_IGNORE_) {
|
1747
|
+
// ignore certain tags
|
1748
|
+
} else if (node.nodeType == goog.dom.NodeType.TEXT) {
|
1749
|
+
if (normalizeWhitespace) {
|
1750
|
+
buf.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));
|
1751
|
+
} else {
|
1752
|
+
buf.push(node.nodeValue);
|
1753
|
+
}
|
1754
|
+
} else if (node.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
|
1755
|
+
buf.push(goog.dom.PREDEFINED_TAG_VALUES_[node.nodeName]);
|
1756
|
+
} else {
|
1757
|
+
var child = node.firstChild;
|
1758
|
+
while (child) {
|
1759
|
+
goog.dom.getTextContent_(child, buf, normalizeWhitespace);
|
1760
|
+
child = child.nextSibling;
|
1761
|
+
}
|
1762
|
+
}
|
1763
|
+
};
|
1764
|
+
|
1765
|
+
|
1766
|
+
/**
|
1767
|
+
* Returns the text length of the text contained in a node, without markup. This
|
1768
|
+
* is equivalent to the selection length if the node was selected, or the number
|
1769
|
+
* of cursor movements to traverse the node. Images & BRs take one space. New
|
1770
|
+
* lines are ignored.
|
1771
|
+
*
|
1772
|
+
* @param {Node} node The node whose text content length is being calculated.
|
1773
|
+
* @return {number} The length of {@code node}'s text content.
|
1774
|
+
*/
|
1775
|
+
goog.dom.getNodeTextLength = function(node) {
|
1776
|
+
return goog.dom.getTextContent(node).length;
|
1777
|
+
};
|
1778
|
+
|
1779
|
+
|
1780
|
+
/**
|
1781
|
+
* Returns the text offset of a node relative to one of its ancestors. The text
|
1782
|
+
* length is the same as the length calculated by goog.dom.getNodeTextLength.
|
1783
|
+
*
|
1784
|
+
* @param {Node} node The node whose offset is being calculated.
|
1785
|
+
* @param {Node=} opt_offsetParent The node relative to which the offset will
|
1786
|
+
* be calculated. Defaults to the node's owner document's body.
|
1787
|
+
* @return {number} The text offset.
|
1788
|
+
*/
|
1789
|
+
goog.dom.getNodeTextOffset = function(node, opt_offsetParent) {
|
1790
|
+
var root = opt_offsetParent || goog.dom.getOwnerDocument(node).body;
|
1791
|
+
var buf = [];
|
1792
|
+
while (node && node != root) {
|
1793
|
+
var cur = node;
|
1794
|
+
while ((cur = cur.previousSibling)) {
|
1795
|
+
buf.unshift(goog.dom.getTextContent(cur));
|
1796
|
+
}
|
1797
|
+
node = node.parentNode;
|
1798
|
+
}
|
1799
|
+
// Trim left to deal with FF cases when there might be line breaks and empty
|
1800
|
+
// nodes at the front of the text
|
1801
|
+
return goog.string.trimLeft(buf.join('')).replace(/ +/g, ' ').length;
|
1802
|
+
};
|
1803
|
+
|
1804
|
+
|
1805
|
+
/**
|
1806
|
+
* Returns the node at a given offset in a parent node. If an object is
|
1807
|
+
* provided for the optional third parameter, the node and the remainder of the
|
1808
|
+
* offset will stored as properties of this object.
|
1809
|
+
* @param {Node} parent The parent node.
|
1810
|
+
* @param {number} offset The offset into the parent node.
|
1811
|
+
* @param {Object=} opt_result Object to be used to store the return value. The
|
1812
|
+
* return value will be stored in the form {node: Node, remainder: number}
|
1813
|
+
* if this object is provided.
|
1814
|
+
* @return {Node} The node at the given offset.
|
1815
|
+
*/
|
1816
|
+
goog.dom.getNodeAtOffset = function(parent, offset, opt_result) {
|
1817
|
+
var stack = [parent], pos = 0, cur = null;
|
1818
|
+
while (stack.length > 0 && pos < offset) {
|
1819
|
+
cur = stack.pop();
|
1820
|
+
if (cur.nodeName in goog.dom.TAGS_TO_IGNORE_) {
|
1821
|
+
// ignore certain tags
|
1822
|
+
} else if (cur.nodeType == goog.dom.NodeType.TEXT) {
|
1823
|
+
var text = cur.nodeValue.replace(/(\r\n|\r|\n)/g, '').replace(/ +/g, ' ');
|
1824
|
+
pos += text.length;
|
1825
|
+
} else if (cur.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
|
1826
|
+
pos += goog.dom.PREDEFINED_TAG_VALUES_[cur.nodeName].length;
|
1827
|
+
} else {
|
1828
|
+
for (var i = cur.childNodes.length - 1; i >= 0; i--) {
|
1829
|
+
stack.push(cur.childNodes[i]);
|
1830
|
+
}
|
1831
|
+
}
|
1832
|
+
}
|
1833
|
+
if (goog.isObject(opt_result)) {
|
1834
|
+
opt_result.remainder = cur ? cur.nodeValue.length + offset - pos - 1 : 0;
|
1835
|
+
opt_result.node = cur;
|
1836
|
+
}
|
1837
|
+
|
1838
|
+
return cur;
|
1839
|
+
};
|
1840
|
+
|
1841
|
+
|
1842
|
+
/**
|
1843
|
+
* Returns true if the object is a {@code NodeList}. To qualify as a NodeList,
|
1844
|
+
* the object must have a numeric length property and an item function (which
|
1845
|
+
* has type 'string' on IE for some reason).
|
1846
|
+
* @param {Object} val Object to test.
|
1847
|
+
* @return {boolean} Whether the object is a NodeList.
|
1848
|
+
*/
|
1849
|
+
goog.dom.isNodeList = function(val) {
|
1850
|
+
// TODO(attila): Now the isNodeList is part of goog.dom we can use
|
1851
|
+
// goog.userAgent to make this simpler.
|
1852
|
+
// A NodeList must have a length property of type 'number' on all platforms.
|
1853
|
+
if (val && typeof val.length == 'number') {
|
1854
|
+
// A NodeList is an object everywhere except Safari, where it's a function.
|
1855
|
+
if (goog.isObject(val)) {
|
1856
|
+
// A NodeList must have an item function (on non-IE platforms) or an item
|
1857
|
+
// property of type 'string' (on IE).
|
1858
|
+
return typeof val.item == 'function' || typeof val.item == 'string';
|
1859
|
+
} else if (goog.isFunction(val)) {
|
1860
|
+
// On Safari, a NodeList is a function with an item property that is also
|
1861
|
+
// a function.
|
1862
|
+
return typeof val.item == 'function';
|
1863
|
+
}
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
// Not a NodeList.
|
1867
|
+
return false;
|
1868
|
+
};
|
1869
|
+
|
1870
|
+
|
1871
|
+
/**
|
1872
|
+
* Walks up the DOM hierarchy returning the first ancestor that has the passed
|
1873
|
+
* tag name and/or class name. If the passed element matches the specified
|
1874
|
+
* criteria, the element itself is returned.
|
1875
|
+
* @param {Node} element The DOM node to start with.
|
1876
|
+
* @param {?(goog.dom.TagName|string)=} opt_tag The tag name to match (or
|
1877
|
+
* null/undefined to match only based on class name).
|
1878
|
+
* @param {?string=} opt_class The class name to match (or null/undefined to
|
1879
|
+
* match only based on tag name).
|
1880
|
+
* @return {Element} The first ancestor that matches the passed criteria, or
|
1881
|
+
* null if no match is found.
|
1882
|
+
*/
|
1883
|
+
goog.dom.getAncestorByTagNameAndClass = function(element, opt_tag, opt_class) {
|
1884
|
+
if (!opt_tag && !opt_class) {
|
1885
|
+
return null;
|
1886
|
+
}
|
1887
|
+
var tagName = opt_tag ? opt_tag.toUpperCase() : null;
|
1888
|
+
return /** @type {Element} */ (goog.dom.getAncestor(element,
|
1889
|
+
function(node) {
|
1890
|
+
return (!tagName || node.nodeName == tagName) &&
|
1891
|
+
(!opt_class || goog.dom.classes.has(node, opt_class));
|
1892
|
+
}, true));
|
1893
|
+
};
|
1894
|
+
|
1895
|
+
|
1896
|
+
/**
|
1897
|
+
* Walks up the DOM hierarchy returning the first ancestor that has the passed
|
1898
|
+
* class name. If the passed element matches the specified criteria, the
|
1899
|
+
* element itself is returned.
|
1900
|
+
* @param {Node} element The DOM node to start with.
|
1901
|
+
* @param {string} className The class name to match.
|
1902
|
+
* @return {Element} The first ancestor that matches the passed criteria, or
|
1903
|
+
* null if none match.
|
1904
|
+
*/
|
1905
|
+
goog.dom.getAncestorByClass = function(element, className) {
|
1906
|
+
return goog.dom.getAncestorByTagNameAndClass(element, null, className);
|
1907
|
+
};
|
1908
|
+
|
1909
|
+
|
1910
|
+
/**
|
1911
|
+
* Walks up the DOM hierarchy returning the first ancestor that passes the
|
1912
|
+
* matcher function.
|
1913
|
+
* @param {Node} element The DOM node to start with.
|
1914
|
+
* @param {function(Node) : boolean} matcher A function that returns true if the
|
1915
|
+
* passed node matches the desired criteria.
|
1916
|
+
* @param {boolean=} opt_includeNode If true, the node itself is included in
|
1917
|
+
* the search (the first call to the matcher will pass startElement as
|
1918
|
+
* the node to test).
|
1919
|
+
* @param {number=} opt_maxSearchSteps Maximum number of levels to search up the
|
1920
|
+
* dom.
|
1921
|
+
* @return {Node} DOM node that matched the matcher, or null if there was
|
1922
|
+
* no match.
|
1923
|
+
*/
|
1924
|
+
goog.dom.getAncestor = function(
|
1925
|
+
element, matcher, opt_includeNode, opt_maxSearchSteps) {
|
1926
|
+
if (!opt_includeNode) {
|
1927
|
+
element = element.parentNode;
|
1928
|
+
}
|
1929
|
+
var ignoreSearchSteps = opt_maxSearchSteps == null;
|
1930
|
+
var steps = 0;
|
1931
|
+
while (element && (ignoreSearchSteps || steps <= opt_maxSearchSteps)) {
|
1932
|
+
if (matcher(element)) {
|
1933
|
+
return element;
|
1934
|
+
}
|
1935
|
+
element = element.parentNode;
|
1936
|
+
steps++;
|
1937
|
+
}
|
1938
|
+
// Reached the root of the DOM without a match
|
1939
|
+
return null;
|
1940
|
+
};
|
1941
|
+
|
1942
|
+
|
1943
|
+
/**
|
1944
|
+
* Determines the active element in the given document.
|
1945
|
+
* @param {Document} doc The document to look in.
|
1946
|
+
* @return {Element} The active element.
|
1947
|
+
*/
|
1948
|
+
goog.dom.getActiveElement = function(doc) {
|
1949
|
+
try {
|
1950
|
+
return doc && doc.activeElement;
|
1951
|
+
} catch (e) {
|
1952
|
+
// NOTE(nicksantos): Sometimes, evaluating document.activeElement in IE
|
1953
|
+
// throws an exception. I'm not 100% sure why, but I suspect it chokes
|
1954
|
+
// on document.activeElement if the activeElement has been recently
|
1955
|
+
// removed from the DOM by a JS operation.
|
1956
|
+
//
|
1957
|
+
// We assume that an exception here simply means
|
1958
|
+
// "there is no active element."
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
return null;
|
1962
|
+
};
|
1963
|
+
|
1964
|
+
|
1965
|
+
|
1966
|
+
/**
|
1967
|
+
* Create an instance of a DOM helper with a new document object.
|
1968
|
+
* @param {Document=} opt_document Document object to associate with this
|
1969
|
+
* DOM helper.
|
1970
|
+
* @constructor
|
1971
|
+
*/
|
1972
|
+
goog.dom.DomHelper = function(opt_document) {
|
1973
|
+
/**
|
1974
|
+
* Reference to the document object to use
|
1975
|
+
* @type {!Document}
|
1976
|
+
* @private
|
1977
|
+
*/
|
1978
|
+
this.document_ = opt_document || goog.global.document || document;
|
1979
|
+
};
|
1980
|
+
|
1981
|
+
|
1982
|
+
/**
|
1983
|
+
* Gets the dom helper object for the document where the element resides.
|
1984
|
+
* @param {Node=} opt_node If present, gets the DomHelper for this node.
|
1985
|
+
* @return {!goog.dom.DomHelper} The DomHelper.
|
1986
|
+
*/
|
1987
|
+
goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
|
1988
|
+
|
1989
|
+
|
1990
|
+
/**
|
1991
|
+
* Sets the document object.
|
1992
|
+
* @param {!Document} document Document object.
|
1993
|
+
*/
|
1994
|
+
goog.dom.DomHelper.prototype.setDocument = function(document) {
|
1995
|
+
this.document_ = document;
|
1996
|
+
};
|
1997
|
+
|
1998
|
+
|
1999
|
+
/**
|
2000
|
+
* Gets the document object being used by the dom library.
|
2001
|
+
* @return {!Document} Document object.
|
2002
|
+
*/
|
2003
|
+
goog.dom.DomHelper.prototype.getDocument = function() {
|
2004
|
+
return this.document_;
|
2005
|
+
};
|
2006
|
+
|
2007
|
+
|
2008
|
+
/**
|
2009
|
+
* Alias for {@code getElementById}. If a DOM node is passed in then we just
|
2010
|
+
* return that.
|
2011
|
+
* @param {string|Element} element Element ID or a DOM node.
|
2012
|
+
* @return {Element} The element with the given ID, or the node passed in.
|
2013
|
+
*/
|
2014
|
+
goog.dom.DomHelper.prototype.getElement = function(element) {
|
2015
|
+
if (goog.isString(element)) {
|
2016
|
+
return this.document_.getElementById(element);
|
2017
|
+
} else {
|
2018
|
+
return element;
|
2019
|
+
}
|
2020
|
+
};
|
2021
|
+
|
2022
|
+
|
2023
|
+
/**
|
2024
|
+
* Alias for {@code getElement}.
|
2025
|
+
* @param {string|Element} element Element ID or a DOM node.
|
2026
|
+
* @return {Element} The element with the given ID, or the node passed in.
|
2027
|
+
* @deprecated Use {@link goog.dom.DomHelper.prototype.getElement} instead.
|
2028
|
+
*/
|
2029
|
+
goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
|
2030
|
+
|
2031
|
+
|
2032
|
+
/**
|
2033
|
+
* Looks up elements by both tag and class name, using browser native functions
|
2034
|
+
* ({@code querySelectorAll}, {@code getElementsByTagName} or
|
2035
|
+
* {@code getElementsByClassName}) where possible. The returned array is a live
|
2036
|
+
* NodeList or a static list depending on the code path taken.
|
2037
|
+
*
|
2038
|
+
* @see goog.dom.query
|
2039
|
+
*
|
2040
|
+
* @param {?string=} opt_tag Element tag name or * for all tags.
|
2041
|
+
* @param {?string=} opt_class Optional class name.
|
2042
|
+
* @param {(Document|Element)=} opt_el Optional element to look in.
|
2043
|
+
* @return { {length: number} } Array-like list of elements (only a length
|
2044
|
+
* property and numerical indices are guaranteed to exist).
|
2045
|
+
*/
|
2046
|
+
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(opt_tag,
|
2047
|
+
opt_class,
|
2048
|
+
opt_el) {
|
2049
|
+
return goog.dom.getElementsByTagNameAndClass_(this.document_, opt_tag,
|
2050
|
+
opt_class, opt_el);
|
2051
|
+
};
|
2052
|
+
|
2053
|
+
|
2054
|
+
/**
|
2055
|
+
* Returns an array of all the elements with the provided className.
|
2056
|
+
* @see {goog.dom.query}
|
2057
|
+
* @param {string} className the name of the class to look for.
|
2058
|
+
* @param {Element|Document=} opt_el Optional element to look in.
|
2059
|
+
* @return { {length: number} } The items found with the class name provided.
|
2060
|
+
*/
|
2061
|
+
goog.dom.DomHelper.prototype.getElementsByClass = function(className, opt_el) {
|
2062
|
+
var doc = opt_el || this.document_;
|
2063
|
+
return goog.dom.getElementsByClass(className, doc);
|
2064
|
+
};
|
2065
|
+
|
2066
|
+
|
2067
|
+
/**
|
2068
|
+
* Returns the first element we find matching the provided class name.
|
2069
|
+
* @see {goog.dom.query}
|
2070
|
+
* @param {string} className the name of the class to look for.
|
2071
|
+
* @param {(Element|Document)=} opt_el Optional element to look in.
|
2072
|
+
* @return {Element} The first item found with the class name provided.
|
2073
|
+
*/
|
2074
|
+
goog.dom.DomHelper.prototype.getElementByClass = function(className, opt_el) {
|
2075
|
+
var doc = opt_el || this.document_;
|
2076
|
+
return goog.dom.getElementByClass(className, doc);
|
2077
|
+
};
|
2078
|
+
|
2079
|
+
|
2080
|
+
/**
|
2081
|
+
* Alias for {@code getElementsByTagNameAndClass}.
|
2082
|
+
* @deprecated Use DomHelper getElementsByTagNameAndClass.
|
2083
|
+
* @see goog.dom.query
|
2084
|
+
*
|
2085
|
+
* @param {?string=} opt_tag Element tag name.
|
2086
|
+
* @param {?string=} opt_class Optional class name.
|
2087
|
+
* @param {Element=} opt_el Optional element to look in.
|
2088
|
+
* @return { {length: number} } Array-like list of elements (only a length
|
2089
|
+
* property and numerical indices are guaranteed to exist).
|
2090
|
+
*/
|
2091
|
+
goog.dom.DomHelper.prototype.$$ =
|
2092
|
+
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
|
2093
|
+
|
2094
|
+
|
2095
|
+
/**
|
2096
|
+
* Sets a number of properties on a node.
|
2097
|
+
* @param {Element} element DOM node to set properties on.
|
2098
|
+
* @param {Object} properties Hash of property:value pairs.
|
2099
|
+
*/
|
2100
|
+
goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
|
2101
|
+
|
2102
|
+
|
2103
|
+
/**
|
2104
|
+
* Gets the dimensions of the viewport.
|
2105
|
+
* @param {Window=} opt_window Optional window element to test. Defaults to
|
2106
|
+
* the window of the Dom Helper.
|
2107
|
+
* @return {!goog.math.Size} Object with values 'width' and 'height'.
|
2108
|
+
*/
|
2109
|
+
goog.dom.DomHelper.prototype.getViewportSize = function(opt_window) {
|
2110
|
+
// TODO(arv): This should not take an argument. That breaks the rule of a
|
2111
|
+
// a DomHelper representing a single frame/window/document.
|
2112
|
+
return goog.dom.getViewportSize(opt_window || this.getWindow());
|
2113
|
+
};
|
2114
|
+
|
2115
|
+
|
2116
|
+
/**
|
2117
|
+
* Calculates the height of the document.
|
2118
|
+
*
|
2119
|
+
* @return {number} The height of the document.
|
2120
|
+
*/
|
2121
|
+
goog.dom.DomHelper.prototype.getDocumentHeight = function() {
|
2122
|
+
return goog.dom.getDocumentHeight_(this.getWindow());
|
2123
|
+
};
|
2124
|
+
|
2125
|
+
|
2126
|
+
/**
|
2127
|
+
* Typedef for use with goog.dom.createDom and goog.dom.append.
|
2128
|
+
* @typedef {Object|string|Array|NodeList}
|
2129
|
+
*/
|
2130
|
+
goog.dom.Appendable;
|
2131
|
+
|
2132
|
+
|
2133
|
+
/**
|
2134
|
+
* Returns a dom node with a set of attributes. This function accepts varargs
|
2135
|
+
* for subsequent nodes to be added. Subsequent nodes will be added to the
|
2136
|
+
* first node as childNodes.
|
2137
|
+
*
|
2138
|
+
* So:
|
2139
|
+
* <code>createDom('div', null, createDom('p'), createDom('p'));</code>
|
2140
|
+
* would return a div with two child paragraphs
|
2141
|
+
*
|
2142
|
+
* An easy way to move all child nodes of an existing element to a new parent
|
2143
|
+
* element is:
|
2144
|
+
* <code>createDom('div', null, oldElement.childNodes);</code>
|
2145
|
+
* which will remove all child nodes from the old element and add them as
|
2146
|
+
* child nodes of the new DIV.
|
2147
|
+
*
|
2148
|
+
* @param {string} tagName Tag to create.
|
2149
|
+
* @param {Object|string=} opt_attributes If object, then a map of name-value
|
2150
|
+
* pairs for attributes. If a string, then this is the className of the new
|
2151
|
+
* element.
|
2152
|
+
* @param {...goog.dom.Appendable} var_args Further DOM nodes or
|
2153
|
+
* strings for text nodes. If one of the var_args is an array or
|
2154
|
+
* NodeList, its elements will be added as childNodes instead.
|
2155
|
+
* @return {!Element} Reference to a DOM node.
|
2156
|
+
*/
|
2157
|
+
goog.dom.DomHelper.prototype.createDom = function(tagName,
|
2158
|
+
opt_attributes,
|
2159
|
+
var_args) {
|
2160
|
+
return goog.dom.createDom_(this.document_, arguments);
|
2161
|
+
};
|
2162
|
+
|
2163
|
+
|
2164
|
+
/**
|
2165
|
+
* Alias for {@code createDom}.
|
2166
|
+
* @param {string} tagName Tag to create.
|
2167
|
+
* @param {(Object|string)=} opt_attributes If object, then a map of name-value
|
2168
|
+
* pairs for attributes. If a string, then this is the className of the new
|
2169
|
+
* element.
|
2170
|
+
* @param {...goog.dom.Appendable} var_args Further DOM nodes or strings for
|
2171
|
+
* text nodes. If one of the var_args is an array, its children will be
|
2172
|
+
* added as childNodes instead.
|
2173
|
+
* @return {!Element} Reference to a DOM node.
|
2174
|
+
* @deprecated Use {@link goog.dom.DomHelper.prototype.createDom} instead.
|
2175
|
+
*/
|
2176
|
+
goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
|
2177
|
+
|
2178
|
+
|
2179
|
+
/**
|
2180
|
+
* Creates a new element.
|
2181
|
+
* @param {string} name Tag name.
|
2182
|
+
* @return {!Element} The new element.
|
2183
|
+
*/
|
2184
|
+
goog.dom.DomHelper.prototype.createElement = function(name) {
|
2185
|
+
return this.document_.createElement(name);
|
2186
|
+
};
|
2187
|
+
|
2188
|
+
|
2189
|
+
/**
|
2190
|
+
* Creates a new text node.
|
2191
|
+
* @param {number|string} content Content.
|
2192
|
+
* @return {!Text} The new text node.
|
2193
|
+
*/
|
2194
|
+
goog.dom.DomHelper.prototype.createTextNode = function(content) {
|
2195
|
+
return this.document_.createTextNode(String(content));
|
2196
|
+
};
|
2197
|
+
|
2198
|
+
|
2199
|
+
/**
|
2200
|
+
* Create a table.
|
2201
|
+
* @param {number} rows The number of rows in the table. Must be >= 1.
|
2202
|
+
* @param {number} columns The number of columns in the table. Must be >= 1.
|
2203
|
+
* @param {boolean=} opt_fillWithNbsp If true, fills table entries with nsbps.
|
2204
|
+
* @return {!Element} The created table.
|
2205
|
+
*/
|
2206
|
+
goog.dom.DomHelper.prototype.createTable = function(rows, columns,
|
2207
|
+
opt_fillWithNbsp) {
|
2208
|
+
return goog.dom.createTable_(this.document_, rows, columns,
|
2209
|
+
!!opt_fillWithNbsp);
|
2210
|
+
};
|
2211
|
+
|
2212
|
+
|
2213
|
+
/**
|
2214
|
+
* Converts an HTML string into a node or a document fragment. A single Node
|
2215
|
+
* is used if the {@code htmlString} only generates a single node. If the
|
2216
|
+
* {@code htmlString} generates multiple nodes then these are put inside a
|
2217
|
+
* {@code DocumentFragment}.
|
2218
|
+
*
|
2219
|
+
* @param {string} htmlString The HTML string to convert.
|
2220
|
+
* @return {!Node} The resulting node.
|
2221
|
+
*/
|
2222
|
+
goog.dom.DomHelper.prototype.htmlToDocumentFragment = function(htmlString) {
|
2223
|
+
return goog.dom.htmlToDocumentFragment_(this.document_, htmlString);
|
2224
|
+
};
|
2225
|
+
|
2226
|
+
|
2227
|
+
/**
|
2228
|
+
* Returns the compatMode of the document.
|
2229
|
+
* @return {string} The result is either CSS1Compat or BackCompat.
|
2230
|
+
* @deprecated use goog.dom.DomHelper.prototype.isCss1CompatMode instead.
|
2231
|
+
*/
|
2232
|
+
goog.dom.DomHelper.prototype.getCompatMode = function() {
|
2233
|
+
return this.isCss1CompatMode() ? 'CSS1Compat' : 'BackCompat';
|
2234
|
+
};
|
2235
|
+
|
2236
|
+
|
2237
|
+
/**
|
2238
|
+
* Returns true if the browser is in "CSS1-compatible" (standards-compliant)
|
2239
|
+
* mode, false otherwise.
|
2240
|
+
* @return {boolean} True if in CSS1-compatible mode.
|
2241
|
+
*/
|
2242
|
+
goog.dom.DomHelper.prototype.isCss1CompatMode = function() {
|
2243
|
+
return goog.dom.isCss1CompatMode_(this.document_);
|
2244
|
+
};
|
2245
|
+
|
2246
|
+
|
2247
|
+
/**
|
2248
|
+
* Gets the window object associated with the document.
|
2249
|
+
* @return {!Window} The window associated with the given document.
|
2250
|
+
*/
|
2251
|
+
goog.dom.DomHelper.prototype.getWindow = function() {
|
2252
|
+
return goog.dom.getWindow_(this.document_);
|
2253
|
+
};
|
2254
|
+
|
2255
|
+
|
2256
|
+
/**
|
2257
|
+
* Gets the document scroll element.
|
2258
|
+
* @return {Element} Scrolling element.
|
2259
|
+
*/
|
2260
|
+
goog.dom.DomHelper.prototype.getDocumentScrollElement = function() {
|
2261
|
+
return goog.dom.getDocumentScrollElement_(this.document_);
|
2262
|
+
};
|
2263
|
+
|
2264
|
+
|
2265
|
+
/**
|
2266
|
+
* Gets the document scroll distance as a coordinate object.
|
2267
|
+
* @return {!goog.math.Coordinate} Object with properties 'x' and 'y'.
|
2268
|
+
*/
|
2269
|
+
goog.dom.DomHelper.prototype.getDocumentScroll = function() {
|
2270
|
+
return goog.dom.getDocumentScroll_(this.document_);
|
2271
|
+
};
|
2272
|
+
|
2273
|
+
|
2274
|
+
/**
|
2275
|
+
* Determines the active element in the given document.
|
2276
|
+
* @param {Document=} opt_doc The document to look in.
|
2277
|
+
* @return {Element} The active element.
|
2278
|
+
*/
|
2279
|
+
goog.dom.DomHelper.prototype.getActiveElement = function(opt_doc) {
|
2280
|
+
return goog.dom.getActiveElement(opt_doc || this.document_);
|
2281
|
+
};
|
2282
|
+
|
2283
|
+
|
2284
|
+
/**
|
2285
|
+
* Appends a child to a node.
|
2286
|
+
* @param {Node} parent Parent.
|
2287
|
+
* @param {Node} child Child.
|
2288
|
+
*/
|
2289
|
+
goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
|
2290
|
+
|
2291
|
+
|
2292
|
+
/**
|
2293
|
+
* Appends a node with text or other nodes.
|
2294
|
+
* @param {!Node} parent The node to append nodes to.
|
2295
|
+
* @param {...goog.dom.Appendable} var_args The things to append to the node.
|
2296
|
+
* If this is a Node it is appended as is.
|
2297
|
+
* If this is a string then a text node is appended.
|
2298
|
+
* If this is an array like object then fields 0 to length - 1 are appended.
|
2299
|
+
*/
|
2300
|
+
goog.dom.DomHelper.prototype.append = goog.dom.append;
|
2301
|
+
|
2302
|
+
|
2303
|
+
/**
|
2304
|
+
* Determines if the given node can contain children, intended to be used for
|
2305
|
+
* HTML generation.
|
2306
|
+
*
|
2307
|
+
* @param {Node} node The node to check.
|
2308
|
+
* @return {boolean} Whether the node can contain children.
|
2309
|
+
*/
|
2310
|
+
goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
|
2311
|
+
|
2312
|
+
|
2313
|
+
/**
|
2314
|
+
* Removes all the child nodes on a DOM node.
|
2315
|
+
* @param {Node} node Node to remove children from.
|
2316
|
+
*/
|
2317
|
+
goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
|
2318
|
+
|
2319
|
+
|
2320
|
+
/**
|
2321
|
+
* Inserts a new node before an existing reference node (i.e., as the previous
|
2322
|
+
* sibling). If the reference node has no parent, then does nothing.
|
2323
|
+
* @param {Node} newNode Node to insert.
|
2324
|
+
* @param {Node} refNode Reference node to insert before.
|
2325
|
+
*/
|
2326
|
+
goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
|
2327
|
+
|
2328
|
+
|
2329
|
+
/**
|
2330
|
+
* Inserts a new node after an existing reference node (i.e., as the next
|
2331
|
+
* sibling). If the reference node has no parent, then does nothing.
|
2332
|
+
* @param {Node} newNode Node to insert.
|
2333
|
+
* @param {Node} refNode Reference node to insert after.
|
2334
|
+
*/
|
2335
|
+
goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
|
2336
|
+
|
2337
|
+
|
2338
|
+
/**
|
2339
|
+
* Insert a child at a given index. If index is larger than the number of child
|
2340
|
+
* nodes that the parent currently has, the node is inserted as the last child
|
2341
|
+
* node.
|
2342
|
+
* @param {Element} parent The element into which to insert the child.
|
2343
|
+
* @param {Node} child The element to insert.
|
2344
|
+
* @param {number} index The index at which to insert the new child node. Must
|
2345
|
+
* not be negative.
|
2346
|
+
*/
|
2347
|
+
goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
|
2348
|
+
|
2349
|
+
|
2350
|
+
/**
|
2351
|
+
* Removes a node from its parent.
|
2352
|
+
* @param {Node} node The node to remove.
|
2353
|
+
* @return {Node} The node removed if removed; else, null.
|
2354
|
+
*/
|
2355
|
+
goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
|
2356
|
+
|
2357
|
+
|
2358
|
+
/**
|
2359
|
+
* Replaces a node in the DOM tree. Will do nothing if {@code oldNode} has no
|
2360
|
+
* parent.
|
2361
|
+
* @param {Node} newNode Node to insert.
|
2362
|
+
* @param {Node} oldNode Node to replace.
|
2363
|
+
*/
|
2364
|
+
goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
|
2365
|
+
|
2366
|
+
|
2367
|
+
/**
|
2368
|
+
* Flattens an element. That is, removes it and replace it with its children.
|
2369
|
+
* @param {Element} element The element to flatten.
|
2370
|
+
* @return {Element|undefined} The original element, detached from the document
|
2371
|
+
* tree, sans children, or undefined if the element was already not in the
|
2372
|
+
* document.
|
2373
|
+
*/
|
2374
|
+
goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
|
2375
|
+
|
2376
|
+
|
2377
|
+
/**
|
2378
|
+
* Returns an array containing just the element children of the given element.
|
2379
|
+
* @param {Element} element The element whose element children we want.
|
2380
|
+
* @return {!(Array|NodeList)} An array or array-like list of just the element
|
2381
|
+
* children of the given element.
|
2382
|
+
*/
|
2383
|
+
goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
|
2384
|
+
|
2385
|
+
|
2386
|
+
/**
|
2387
|
+
* Returns the first child node that is an element.
|
2388
|
+
* @param {Node} node The node to get the first child element of.
|
2389
|
+
* @return {Element} The first child node of {@code node} that is an element.
|
2390
|
+
*/
|
2391
|
+
goog.dom.DomHelper.prototype.getFirstElementChild =
|
2392
|
+
goog.dom.getFirstElementChild;
|
2393
|
+
|
2394
|
+
|
2395
|
+
/**
|
2396
|
+
* Returns the last child node that is an element.
|
2397
|
+
* @param {Node} node The node to get the last child element of.
|
2398
|
+
* @return {Element} The last child node of {@code node} that is an element.
|
2399
|
+
*/
|
2400
|
+
goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
|
2401
|
+
|
2402
|
+
|
2403
|
+
/**
|
2404
|
+
* Returns the first next sibling that is an element.
|
2405
|
+
* @param {Node} node The node to get the next sibling element of.
|
2406
|
+
* @return {Element} The next sibling of {@code node} that is an element.
|
2407
|
+
*/
|
2408
|
+
goog.dom.DomHelper.prototype.getNextElementSibling =
|
2409
|
+
goog.dom.getNextElementSibling;
|
2410
|
+
|
2411
|
+
|
2412
|
+
/**
|
2413
|
+
* Returns the first previous sibling that is an element.
|
2414
|
+
* @param {Node} node The node to get the previous sibling element of.
|
2415
|
+
* @return {Element} The first previous sibling of {@code node} that is
|
2416
|
+
* an element.
|
2417
|
+
*/
|
2418
|
+
goog.dom.DomHelper.prototype.getPreviousElementSibling =
|
2419
|
+
goog.dom.getPreviousElementSibling;
|
2420
|
+
|
2421
|
+
|
2422
|
+
/**
|
2423
|
+
* Returns the next node in source order from the given node.
|
2424
|
+
* @param {Node} node The node.
|
2425
|
+
* @return {Node} The next node in the DOM tree, or null if this was the last
|
2426
|
+
* node.
|
2427
|
+
*/
|
2428
|
+
goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
|
2429
|
+
|
2430
|
+
|
2431
|
+
/**
|
2432
|
+
* Returns the previous node in source order from the given node.
|
2433
|
+
* @param {Node} node The node.
|
2434
|
+
* @return {Node} The previous node in the DOM tree, or null if this was the
|
2435
|
+
* first node.
|
2436
|
+
*/
|
2437
|
+
goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
|
2438
|
+
|
2439
|
+
|
2440
|
+
/**
|
2441
|
+
* Whether the object looks like a DOM node.
|
2442
|
+
* @param {*} obj The object being tested for node likeness.
|
2443
|
+
* @return {boolean} Whether the object looks like a DOM node.
|
2444
|
+
*/
|
2445
|
+
goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
|
2446
|
+
|
2447
|
+
|
2448
|
+
/**
|
2449
|
+
* Whether the object looks like an Element.
|
2450
|
+
* @param {*} obj The object being tested for Element likeness.
|
2451
|
+
* @return {boolean} Whether the object looks like an Element.
|
2452
|
+
*/
|
2453
|
+
goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
|
2454
|
+
|
2455
|
+
|
2456
|
+
/**
|
2457
|
+
* Returns true if the specified value is a Window object. This includes the
|
2458
|
+
* global window for HTML pages, and iframe windows.
|
2459
|
+
* @param {*} obj Variable to test.
|
2460
|
+
* @return {boolean} Whether the variable is a window.
|
2461
|
+
*/
|
2462
|
+
goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
|
2463
|
+
|
2464
|
+
|
2465
|
+
/**
|
2466
|
+
* Returns an element's parent, if it's an Element.
|
2467
|
+
* @param {Element} element The DOM element.
|
2468
|
+
* @return {Element} The parent, or null if not an Element.
|
2469
|
+
*/
|
2470
|
+
goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
|
2471
|
+
|
2472
|
+
|
2473
|
+
/**
|
2474
|
+
* Whether a node contains another node.
|
2475
|
+
* @param {Node} parent The node that should contain the other node.
|
2476
|
+
* @param {Node} descendant The node to test presence of.
|
2477
|
+
* @return {boolean} Whether the parent node contains the descendent node.
|
2478
|
+
*/
|
2479
|
+
goog.dom.DomHelper.prototype.contains = goog.dom.contains;
|
2480
|
+
|
2481
|
+
|
2482
|
+
/**
|
2483
|
+
* Compares the document order of two nodes, returning 0 if they are the same
|
2484
|
+
* node, a negative number if node1 is before node2, and a positive number if
|
2485
|
+
* node2 is before node1. Note that we compare the order the tags appear in the
|
2486
|
+
* document so in the tree <b><i>text</i></b> the B node is considered to be
|
2487
|
+
* before the I node.
|
2488
|
+
*
|
2489
|
+
* @param {Node} node1 The first node to compare.
|
2490
|
+
* @param {Node} node2 The second node to compare.
|
2491
|
+
* @return {number} 0 if the nodes are the same node, a negative number if node1
|
2492
|
+
* is before node2, and a positive number if node2 is before node1.
|
2493
|
+
*/
|
2494
|
+
goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
|
2495
|
+
|
2496
|
+
|
2497
|
+
/**
|
2498
|
+
* Find the deepest common ancestor of the given nodes.
|
2499
|
+
* @param {...Node} var_args The nodes to find a common ancestor of.
|
2500
|
+
* @return {Node} The common ancestor of the nodes, or null if there is none.
|
2501
|
+
* null will only be returned if two or more of the nodes are from different
|
2502
|
+
* documents.
|
2503
|
+
*/
|
2504
|
+
goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
|
2505
|
+
|
2506
|
+
|
2507
|
+
/**
|
2508
|
+
* Returns the owner document for a node.
|
2509
|
+
* @param {Node} node The node to get the document for.
|
2510
|
+
* @return {!Document} The document owning the node.
|
2511
|
+
*/
|
2512
|
+
goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
|
2513
|
+
|
2514
|
+
|
2515
|
+
/**
|
2516
|
+
* Cross browser function for getting the document element of an iframe.
|
2517
|
+
* @param {Element} iframe Iframe element.
|
2518
|
+
* @return {!Document} The frame content document.
|
2519
|
+
*/
|
2520
|
+
goog.dom.DomHelper.prototype.getFrameContentDocument =
|
2521
|
+
goog.dom.getFrameContentDocument;
|
2522
|
+
|
2523
|
+
|
2524
|
+
/**
|
2525
|
+
* Cross browser function for getting the window of a frame or iframe.
|
2526
|
+
* @param {Element} frame Frame element.
|
2527
|
+
* @return {Window} The window associated with the given frame.
|
2528
|
+
*/
|
2529
|
+
goog.dom.DomHelper.prototype.getFrameContentWindow =
|
2530
|
+
goog.dom.getFrameContentWindow;
|
2531
|
+
|
2532
|
+
|
2533
|
+
/**
|
2534
|
+
* Cross browser function for setting the text content of an element.
|
2535
|
+
* @param {Element} element The element to change the text content of.
|
2536
|
+
* @param {string} text The string that should replace the current element
|
2537
|
+
* content with.
|
2538
|
+
*/
|
2539
|
+
goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
|
2540
|
+
|
2541
|
+
|
2542
|
+
/**
|
2543
|
+
* Gets the outerHTML of a node, which islike innerHTML, except that it
|
2544
|
+
* actually contains the HTML of the node itself.
|
2545
|
+
* @param {Element} element The element to get the HTML of.
|
2546
|
+
* @return {string} The outerHTML of the given element.
|
2547
|
+
*/
|
2548
|
+
goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
|
2549
|
+
|
2550
|
+
|
2551
|
+
/**
|
2552
|
+
* Finds the first descendant node that matches the filter function. This does
|
2553
|
+
* a depth first search.
|
2554
|
+
* @param {Node} root The root of the tree to search.
|
2555
|
+
* @param {function(Node) : boolean} p The filter function.
|
2556
|
+
* @return {Node|undefined} The found node or undefined if none is found.
|
2557
|
+
*/
|
2558
|
+
goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
|
2559
|
+
|
2560
|
+
|
2561
|
+
/**
|
2562
|
+
* Finds all the descendant nodes that matches the filter function. This does a
|
2563
|
+
* depth first search.
|
2564
|
+
* @param {Node} root The root of the tree to search.
|
2565
|
+
* @param {function(Node) : boolean} p The filter function.
|
2566
|
+
* @return {Array.<Node>} The found nodes or an empty array if none are found.
|
2567
|
+
*/
|
2568
|
+
goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
|
2569
|
+
|
2570
|
+
|
2571
|
+
/**
|
2572
|
+
* Returns true if the element has a tab index that allows it to receive
|
2573
|
+
* keyboard focus (tabIndex >= 0), false otherwise. Note that form elements
|
2574
|
+
* natively support keyboard focus, even if they have no tab index.
|
2575
|
+
* @param {Element} element Element to check.
|
2576
|
+
* @return {boolean} Whether the element has a tab index that allows keyboard
|
2577
|
+
* focus.
|
2578
|
+
*/
|
2579
|
+
goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
|
2580
|
+
|
2581
|
+
|
2582
|
+
/**
|
2583
|
+
* Enables or disables keyboard focus support on the element via its tab index.
|
2584
|
+
* Only elements for which {@link goog.dom.isFocusableTabIndex} returns true
|
2585
|
+
* (or elements that natively support keyboard focus, like form elements) can
|
2586
|
+
* receive keyboard focus. See http://go/tabindex for more info.
|
2587
|
+
* @param {Element} element Element whose tab index is to be changed.
|
2588
|
+
* @param {boolean} enable Whether to set or remove a tab index on the element
|
2589
|
+
* that supports keyboard focus.
|
2590
|
+
*/
|
2591
|
+
goog.dom.DomHelper.prototype.setFocusableTabIndex =
|
2592
|
+
goog.dom.setFocusableTabIndex;
|
2593
|
+
|
2594
|
+
|
2595
|
+
/**
|
2596
|
+
* Returns the text contents of the current node, without markup. New lines are
|
2597
|
+
* stripped and whitespace is collapsed, such that each character would be
|
2598
|
+
* visible.
|
2599
|
+
*
|
2600
|
+
* In browsers that support it, innerText is used. Other browsers attempt to
|
2601
|
+
* simulate it via node traversal. Line breaks are canonicalized in IE.
|
2602
|
+
*
|
2603
|
+
* @param {Node} node The node from which we are getting content.
|
2604
|
+
* @return {string} The text content.
|
2605
|
+
*/
|
2606
|
+
goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
|
2607
|
+
|
2608
|
+
|
2609
|
+
/**
|
2610
|
+
* Returns the text length of the text contained in a node, without markup. This
|
2611
|
+
* is equivalent to the selection length if the node was selected, or the number
|
2612
|
+
* of cursor movements to traverse the node. Images & BRs take one space. New
|
2613
|
+
* lines are ignored.
|
2614
|
+
*
|
2615
|
+
* @param {Node} node The node whose text content length is being calculated.
|
2616
|
+
* @return {number} The length of {@code node}'s text content.
|
2617
|
+
*/
|
2618
|
+
goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
|
2619
|
+
|
2620
|
+
|
2621
|
+
/**
|
2622
|
+
* Returns the text offset of a node relative to one of its ancestors. The text
|
2623
|
+
* length is the same as the length calculated by
|
2624
|
+
* {@code goog.dom.getNodeTextLength}.
|
2625
|
+
*
|
2626
|
+
* @param {Node} node The node whose offset is being calculated.
|
2627
|
+
* @param {Node=} opt_offsetParent Defaults to the node's owner document's body.
|
2628
|
+
* @return {number} The text offset.
|
2629
|
+
*/
|
2630
|
+
goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
|
2631
|
+
|
2632
|
+
|
2633
|
+
/**
|
2634
|
+
* Returns the node at a given offset in a parent node. If an object is
|
2635
|
+
* provided for the optional third parameter, the node and the remainder of the
|
2636
|
+
* offset will stored as properties of this object.
|
2637
|
+
* @param {Node} parent The parent node.
|
2638
|
+
* @param {number} offset The offset into the parent node.
|
2639
|
+
* @param {Object=} opt_result Object to be used to store the return value. The
|
2640
|
+
* return value will be stored in the form {node: Node, remainder: number}
|
2641
|
+
* if this object is provided.
|
2642
|
+
* @return {Node} The node at the given offset.
|
2643
|
+
*/
|
2644
|
+
goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
|
2645
|
+
|
2646
|
+
|
2647
|
+
/**
|
2648
|
+
* Returns true if the object is a {@code NodeList}. To qualify as a NodeList,
|
2649
|
+
* the object must have a numeric length property and an item function (which
|
2650
|
+
* has type 'string' on IE for some reason).
|
2651
|
+
* @param {Object} val Object to test.
|
2652
|
+
* @return {boolean} Whether the object is a NodeList.
|
2653
|
+
*/
|
2654
|
+
goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
|
2655
|
+
|
2656
|
+
|
2657
|
+
/**
|
2658
|
+
* Walks up the DOM hierarchy returning the first ancestor that has the passed
|
2659
|
+
* tag name and/or class name. If the passed element matches the specified
|
2660
|
+
* criteria, the element itself is returned.
|
2661
|
+
* @param {Node} element The DOM node to start with.
|
2662
|
+
* @param {?(goog.dom.TagName|string)=} opt_tag The tag name to match (or
|
2663
|
+
* null/undefined to match only based on class name).
|
2664
|
+
* @param {?string=} opt_class The class name to match (or null/undefined to
|
2665
|
+
* match only based on tag name).
|
2666
|
+
* @return {Element} The first ancestor that matches the passed criteria, or
|
2667
|
+
* null if no match is found.
|
2668
|
+
*/
|
2669
|
+
goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass =
|
2670
|
+
goog.dom.getAncestorByTagNameAndClass;
|
2671
|
+
|
2672
|
+
|
2673
|
+
/**
|
2674
|
+
* Walks up the DOM hierarchy returning the first ancestor that has the passed
|
2675
|
+
* class name. If the passed element matches the specified criteria, the
|
2676
|
+
* element itself is returned.
|
2677
|
+
* @param {Node} element The DOM node to start with.
|
2678
|
+
* @param {string} class The class name to match.
|
2679
|
+
* @return {Element} The first ancestor that matches the passed criteria, or
|
2680
|
+
* null if none match.
|
2681
|
+
*/
|
2682
|
+
goog.dom.DomHelper.prototype.getAncestorByClass =
|
2683
|
+
goog.dom.getAncestorByClass;
|
2684
|
+
|
2685
|
+
|
2686
|
+
/**
|
2687
|
+
* Walks up the DOM hierarchy returning the first ancestor that passes the
|
2688
|
+
* matcher function.
|
2689
|
+
* @param {Node} element The DOM node to start with.
|
2690
|
+
* @param {function(Node) : boolean} matcher A function that returns true if the
|
2691
|
+
* passed node matches the desired criteria.
|
2692
|
+
* @param {boolean=} opt_includeNode If true, the node itself is included in
|
2693
|
+
* the search (the first call to the matcher will pass startElement as
|
2694
|
+
* the node to test).
|
2695
|
+
* @param {number=} opt_maxSearchSteps Maximum number of levels to search up the
|
2696
|
+
* dom.
|
2697
|
+
* @return {Node} DOM node that matched the matcher, or null if there was
|
2698
|
+
* no match.
|
2699
|
+
*/
|
2700
|
+
goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
|