polymer-paper-rails 0.2.6 → 1.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/components/iron-a11y-announcer/README.md +29 -0
- data/app/assets/components/iron-a11y-announcer/bower.json +28 -0
- data/app/assets/components/iron-a11y-announcer/demo/index.html +40 -0
- data/app/assets/components/iron-a11y-announcer/demo/x-announces.html +50 -0
- data/app/assets/components/iron-a11y-announcer/index.html +28 -0
- data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
- data/app/assets/components/iron-a11y-announcer/test/index.html +26 -0
- data/app/assets/components/iron-a11y-announcer/test/iron-a11y-announcer.html +59 -0
- data/app/assets/components/iron-a11y-keys-behavior/README.md +15 -0
- data/app/assets/components/iron-a11y-keys-behavior/bower.json +27 -0
- data/app/assets/components/iron-a11y-keys-behavior/demo/index.html +21 -0
- data/app/assets/components/iron-a11y-keys-behavior/demo/x-key-aware.html +69 -0
- data/app/assets/components/iron-a11y-keys-behavior/index.html +24 -0
- data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
- data/app/assets/components/iron-a11y-keys-behavior/test/basic-test.html +248 -0
- data/app/assets/components/{paper-icon-button/metadata.html → iron-a11y-keys-behavior/test/index.html} +18 -10
- data/app/assets/components/iron-autogrow-textarea/README.md +24 -0
- data/app/assets/components/iron-autogrow-textarea/bower.json +37 -0
- data/app/assets/components/iron-autogrow-textarea/demo/index.html +81 -0
- data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
- data/app/assets/components/iron-autogrow-textarea/index.html +30 -0
- data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
- data/app/assets/components/iron-autogrow-textarea/test/basic.html +94 -0
- data/app/assets/components/iron-autogrow-textarea/test/index.html +25 -0
- data/app/assets/components/iron-behaviors/README.md +4 -0
- data/app/assets/components/iron-behaviors/bower.json +25 -0
- data/app/assets/components/iron-behaviors/demo/index.html +49 -0
- data/app/assets/components/iron-behaviors/demo/simple-button.html +70 -0
- data/app/assets/components/iron-behaviors/index.html +27 -0
- data/app/assets/components/iron-behaviors/iron-button-state.html +195 -0
- data/app/assets/components/iron-behaviors/iron-control-state.html +102 -0
- data/app/assets/components/iron-behaviors/test/active-state.html +154 -0
- data/app/assets/components/iron-behaviors/test/disabled-state.html +85 -0
- data/app/assets/components/iron-behaviors/test/focused-state.html +82 -0
- data/app/assets/components/iron-behaviors/test/index.html +25 -0
- data/app/assets/components/iron-behaviors/test/test-elements.html +44 -0
- data/app/assets/components/iron-fit-behavior/README.md +3 -0
- data/app/assets/components/iron-fit-behavior/bower.json +31 -0
- data/app/assets/components/iron-fit-behavior/demo/index.html +42 -0
- data/app/assets/components/iron-fit-behavior/demo/simple-fit.html +42 -0
- data/app/assets/components/iron-fit-behavior/index.html +30 -0
- data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
- data/app/assets/components/iron-fit-behavior/test/index.html +34 -0
- data/app/assets/components/iron-fit-behavior/test/iron-fit-behavior.html +332 -0
- data/app/assets/components/iron-fit-behavior/test/test-fit.html +42 -0
- data/app/assets/components/iron-flex-layout/README.md +4 -0
- data/app/assets/components/iron-flex-layout/bower.json +21 -0
- data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
- data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
- data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
- data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
- data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
- data/app/assets/components/iron-form-element-behavior/README.md +2 -0
- data/app/assets/components/iron-form-element-behavior/bower.json +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/index.html +53 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-element.html +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-form.html +42 -0
- data/app/assets/components/iron-form-element-behavior/index.html +30 -0
- data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
- data/app/assets/components/iron-icon/README.md +56 -0
- data/app/assets/components/iron-icon/bower.json +29 -0
- data/app/assets/components/iron-icon/demo/index.html +28 -0
- data/app/assets/components/iron-icon/demo/location.png +0 -0
- data/app/assets/components/iron-icon/hero.svg +19 -0
- data/app/assets/components/iron-icon/index.html +26 -0
- data/app/assets/components/iron-icon/iron-icon.html +187 -0
- data/app/assets/components/iron-icon/test/index.html +31 -0
- data/app/assets/components/iron-icon/test/iron-icon.html +120 -0
- data/app/assets/components/iron-icons/README.md +8 -0
- data/app/assets/components/{core-icons → iron-icons}/av-icons.html +19 -11
- data/app/assets/components/iron-icons/bower.json +37 -0
- data/app/assets/components/{core-icons → iron-icons}/communication-icons.html +14 -9
- data/app/assets/components/iron-icons/demo/index.html +132 -0
- data/app/assets/components/{core-icons → iron-icons}/device-icons.html +13 -9
- data/app/assets/components/{core-icons → iron-icons}/editor-icons.html +8 -5
- data/app/assets/components/{core-icons → iron-icons}/hardware-icons.html +11 -6
- data/app/assets/components/iron-icons/hero.svg +35 -0
- data/app/assets/components/{core-icons → iron-icons}/image-icons.html +23 -11
- data/app/assets/components/{core-menu/core-submenu.css → iron-icons/index.html} +14 -32
- data/app/assets/components/{core-icons/core-icons.html → iron-icons/iron-icons.html} +60 -35
- data/app/assets/components/{core-icons → iron-icons}/maps-icons.html +13 -12
- data/app/assets/components/{core-icons → iron-icons}/notification-icons.html +20 -7
- data/app/assets/components/{core-icons → iron-icons}/social-icons.html +6 -5
- data/app/assets/components/iron-iconset-svg/README.md +4 -0
- data/app/assets/components/iron-iconset-svg/bower.json +27 -0
- data/app/assets/components/iron-iconset-svg/demo/index.html +65 -0
- data/app/assets/components/{core-iconset-svg → iron-iconset-svg/demo}/svg-sample-icons.html +12 -11
- data/app/assets/components/iron-iconset-svg/index.html +26 -0
- data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
- data/app/assets/components/iron-iconset-svg/test/index.html +30 -0
- data/app/assets/components/iron-iconset-svg/test/iron-iconset-svg.html +107 -0
- data/app/assets/components/iron-input/README.md +16 -0
- data/app/assets/components/iron-input/bower.json +36 -0
- data/app/assets/components/iron-input/demo/index.html +87 -0
- data/app/assets/components/iron-input/hero.svg +19 -0
- data/app/assets/components/iron-input/index.html +30 -0
- data/app/assets/components/iron-input/iron-input.html +235 -0
- data/app/assets/components/iron-input/test/index.html +24 -0
- data/app/assets/components/iron-input/test/iron-input.html +139 -0
- data/app/assets/components/iron-input/test/letters-only.html +30 -0
- data/app/assets/components/iron-media-query/README.md +11 -0
- data/app/assets/components/iron-media-query/bower.json +30 -0
- data/app/assets/components/iron-media-query/demo/index.html +38 -0
- data/app/assets/components/iron-media-query/hero.svg +29 -0
- data/app/assets/components/iron-media-query/index.html +29 -0
- data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
- data/app/assets/components/iron-media-query/test/basic.html +71 -0
- data/app/assets/components/iron-media-query/test/index.html +30 -0
- data/app/assets/components/iron-menu-behavior/README.md +3 -0
- data/app/assets/components/iron-menu-behavior/bower.json +32 -0
- data/app/assets/components/iron-menu-behavior/demo/index.html +100 -0
- data/app/assets/components/iron-menu-behavior/demo/simple-menu.html +50 -0
- data/app/assets/components/iron-menu-behavior/demo/simple-menubar.html +54 -0
- data/app/assets/components/iron-menu-behavior/index.html +30 -0
- data/app/assets/components/iron-menu-behavior/iron-menu-behavior.html +214 -0
- data/app/assets/components/iron-menu-behavior/iron-menubar-behavior.html +65 -0
- data/app/assets/components/iron-menu-behavior/test/index.html +35 -0
- data/app/assets/components/iron-menu-behavior/test/iron-menu-behavior.html +108 -0
- data/app/assets/components/iron-menu-behavior/test/iron-menubar-behavior.html +108 -0
- data/app/assets/components/iron-menu-behavior/test/test-menu.html +40 -0
- data/app/assets/components/iron-menu-behavior/test/test-menubar.html +40 -0
- data/app/assets/components/iron-meta/README.md +46 -0
- data/app/assets/components/iron-meta/bower.json +28 -0
- data/app/assets/components/iron-meta/demo/index.html +45 -0
- data/app/assets/components/iron-meta/hero.svg +33 -0
- data/app/assets/components/iron-meta/index.html +27 -0
- data/app/assets/components/iron-meta/iron-meta.html +352 -0
- data/app/assets/components/iron-meta/test/basic.html +48 -0
- data/app/assets/components/iron-meta/test/index.html +30 -0
- data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
- data/app/assets/components/iron-overlay-behavior/README.md +11 -0
- data/app/assets/components/iron-overlay-behavior/bower.json +36 -0
- data/app/assets/components/iron-overlay-behavior/demo/index.html +149 -0
- data/app/assets/components/iron-overlay-behavior/demo/simple-overlay.html +50 -0
- data/app/assets/components/iron-overlay-behavior/index.html +30 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-backdrop.html +132 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-behavior.html +432 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-manager.html +107 -0
- data/app/assets/components/iron-overlay-behavior/test/index.html +34 -0
- data/app/assets/components/iron-overlay-behavior/test/iron-overlay-behavior.html +314 -0
- data/app/assets/components/iron-overlay-behavior/test/test-overlay.html +49 -0
- data/app/assets/components/iron-range-behavior/README.md +4 -0
- data/app/assets/components/iron-range-behavior/bower.json +30 -0
- data/app/assets/components/iron-range-behavior/demo/index.html +76 -0
- data/app/assets/components/iron-range-behavior/index.html +24 -0
- data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
- data/app/assets/components/iron-range-behavior/test/basic.html +119 -0
- data/app/assets/components/iron-range-behavior/test/index.html +25 -0
- data/app/assets/components/iron-resizable-behavior/README.md +16 -0
- data/app/assets/components/iron-resizable-behavior/bower.json +26 -0
- data/app/assets/components/iron-resizable-behavior/demo/index.html +29 -0
- data/app/assets/components/iron-resizable-behavior/demo/src/x-app.html +114 -0
- data/app/assets/components/iron-resizable-behavior/index.html +25 -0
- data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
- data/app/assets/components/iron-resizable-behavior/test/basic.html +263 -0
- data/app/assets/components/{core-overlay/core-key-helper.html → iron-resizable-behavior/test/index.html} +20 -11
- data/app/assets/components/iron-resizable-behavior/test/test-elements.html +143 -0
- data/app/assets/components/iron-selector/README.md +50 -0
- data/app/assets/components/iron-selector/bower.json +31 -0
- data/app/assets/components/iron-selector/demo/index.html +66 -0
- data/app/assets/components/iron-selector/index.html +28 -0
- data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
- data/app/assets/components/iron-selector/iron-selectable.html +307 -0
- data/app/assets/components/iron-selector/iron-selection.html +115 -0
- data/app/assets/components/iron-selector/iron-selector.html +71 -0
- data/app/assets/components/iron-selector/test/activate-event.html +138 -0
- data/app/assets/components/iron-selector/test/basic.html +150 -0
- data/app/assets/components/iron-selector/test/content-element.html +43 -0
- data/app/assets/components/iron-selector/test/content.html +168 -0
- data/app/assets/components/iron-selector/test/index.html +36 -0
- data/app/assets/components/iron-selector/test/multi.html +135 -0
- data/app/assets/components/iron-selector/test/next-previous.html +134 -0
- data/app/assets/components/iron-selector/test/selected-attribute.html +72 -0
- data/app/assets/components/iron-selector/test/template-repeat.html +110 -0
- data/app/assets/components/iron-validatable-behavior/README.md +3 -0
- data/app/assets/components/iron-validatable-behavior/bower.json +35 -0
- data/app/assets/components/iron-validatable-behavior/demo/cats-only.html +46 -0
- data/app/assets/components/iron-validatable-behavior/demo/index.html +71 -0
- data/app/assets/components/iron-validatable-behavior/demo/validatable-input.html +46 -0
- data/app/assets/components/iron-validatable-behavior/index.html +30 -0
- data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +101 -0
- data/app/assets/components/iron-validatable-behavior/test/index.html +35 -0
- data/app/assets/components/iron-validatable-behavior/test/iron-validatable-behavior.html +52 -0
- data/app/assets/components/iron-validatable-behavior/test/test-validatable.html +28 -0
- data/app/assets/components/neon-animation/README.md +304 -0
- data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
- data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
- data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
- data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
- data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
- data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
- data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
- data/app/assets/components/neon-animation/bower.json +51 -0
- data/app/assets/components/neon-animation/demo/declarative/index.html +108 -0
- data/app/assets/components/neon-animation/demo/doc/basic.html +47 -0
- data/app/assets/components/neon-animation/demo/doc/my-animatable.html +73 -0
- data/app/assets/components/neon-animation/demo/doc/my-dialog.html +97 -0
- data/app/assets/components/neon-animation/demo/doc/types.html +53 -0
- data/app/assets/components/neon-animation/demo/dropdown/animated-dropdown.html +97 -0
- data/app/assets/components/neon-animation/demo/dropdown/index.html +54 -0
- data/app/assets/components/neon-animation/demo/grid/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/grid/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/grid/index.html +70 -0
- data/app/assets/components/neon-animation/demo/index.html +6 -0
- data/app/assets/components/neon-animation/demo/list/full-view.html +122 -0
- data/app/assets/components/neon-animation/demo/list/index.html +29 -0
- data/app/assets/components/neon-animation/demo/list/list-demo.html +112 -0
- data/app/assets/components/neon-animation/demo/list/list-view.html +127 -0
- data/app/assets/components/neon-animation/demo/load/animated-grid.html +147 -0
- data/app/assets/components/neon-animation/demo/load/full-page.html +86 -0
- data/app/assets/components/neon-animation/demo/load/index.html +45 -0
- data/app/assets/components/neon-animation/demo/reprojection/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/reprojection/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/reprojection/index.html +66 -0
- data/app/assets/components/neon-animation/demo/reprojection/reprojected-pages.html +42 -0
- data/app/assets/components/neon-animation/demo/shared.css +40 -0
- data/app/assets/components/neon-animation/demo/tiles/circles-page.html +110 -0
- data/app/assets/components/neon-animation/demo/tiles/index.html +77 -0
- data/app/assets/components/neon-animation/demo/tiles/squares-page.html +104 -0
- data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
- data/app/assets/components/neon-animation/index.html +30 -0
- data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
- data/app/assets/components/neon-animation/neon-animatable.html +54 -0
- data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
- data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
- data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
- data/app/assets/components/neon-animation/neon-animation.html +17 -0
- data/app/assets/components/neon-animation/neon-animations.html +25 -0
- data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
- data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
- data/app/assets/components/{core-collapse/core-collapse.css → neon-animation/web-animations.html} +5 -10
- data/app/assets/components/paper-behaviors/README.md +4 -0
- data/app/assets/components/paper-behaviors/bower.json +39 -0
- data/app/assets/components/paper-behaviors/demo/index.html +57 -0
- data/app/assets/components/paper-behaviors/demo/paper-button.html +71 -0
- data/app/assets/components/paper-behaviors/demo/paper-radio-button.html +116 -0
- data/app/assets/components/paper-behaviors/index.html +26 -0
- data/app/assets/components/paper-behaviors/paper-button-behavior.html +55 -0
- data/app/assets/components/paper-behaviors/paper-inky-focus-behavior.html +44 -0
- data/app/assets/components/paper-behaviors/test/index.html +26 -0
- data/app/assets/components/paper-behaviors/test/paper-button-behavior.html +82 -0
- data/app/assets/components/paper-behaviors/test/paper-radio-button-behavior.html +62 -0
- data/app/assets/components/paper-behaviors/test/test-button.html +34 -0
- data/app/assets/components/paper-behaviors/test/test-radio-button.html +41 -0
- data/app/assets/components/paper-button/README.md +45 -0
- data/app/assets/components/paper-button/bower.json +39 -0
- data/app/assets/components/paper-button/demo/index.html +158 -0
- data/app/assets/components/paper-button/index.html +26 -0
- data/app/assets/components/paper-button/paper-button.html +113 -133
- data/app/assets/components/paper-button/test/index.html +25 -0
- data/app/assets/components/paper-button/test/paper-button.html +83 -0
- data/app/assets/components/paper-checkbox/README.md +31 -0
- data/app/assets/components/paper-checkbox/bower.json +37 -0
- data/app/assets/components/paper-checkbox/demo/index.html +94 -0
- data/app/assets/components/paper-checkbox/index.html +30 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.css +141 -136
- data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -102
- data/app/assets/components/paper-checkbox/test/basic.html +101 -0
- data/app/assets/components/paper-checkbox/test/index.html +24 -0
- data/app/assets/components/paper-dialog/README.md +3 -0
- data/app/assets/components/paper-dialog/bower.json +35 -0
- data/app/assets/components/paper-dialog/demo/index.html +158 -0
- data/app/assets/components/paper-dialog/hero.svg +58 -0
- data/app/assets/components/paper-dialog/index.html +30 -0
- data/app/assets/components/paper-dialog/paper-dialog.html +87 -66
- data/app/assets/components/paper-dialog/test/index.html +34 -0
- data/app/assets/components/paper-dialog/test/paper-dialog.html +53 -0
- data/app/assets/components/paper-dialog-behavior/README.md +24 -0
- data/app/assets/components/paper-dialog-behavior/bower.json +37 -0
- data/app/assets/components/paper-dialog-behavior/demo/index.html +96 -0
- data/app/assets/components/paper-dialog-behavior/demo/simple-dialog.html +42 -0
- data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
- data/app/assets/components/paper-dialog-behavior/index.html +30 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-behavior.html +236 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-common.css +58 -0
- data/app/assets/components/paper-dialog-behavior/test/index.html +34 -0
- data/app/assets/components/paper-dialog-behavior/test/paper-dialog-behavior.html +217 -0
- data/app/assets/components/paper-dialog-behavior/test/test-dialog.html +42 -0
- data/app/assets/components/paper-dialog-scrollable/README.md +8 -0
- data/app/assets/components/paper-dialog-scrollable/bower.json +36 -0
- data/app/assets/components/paper-dialog-scrollable/demo/index.html +290 -0
- data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
- data/app/assets/components/paper-dialog-scrollable/index.html +30 -0
- data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
- data/app/assets/components/paper-dialog-scrollable/test/index.html +34 -0
- data/app/assets/components/paper-dialog-scrollable/test/paper-dialog-scrollable.html +171 -0
- data/app/assets/components/paper-drawer-panel/README.md +71 -0
- data/app/assets/components/paper-drawer-panel/bower.json +33 -0
- data/app/assets/components/paper-drawer-panel/demo/index.html +85 -0
- data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
- data/app/assets/components/paper-drawer-panel/index.html +29 -0
- data/app/assets/components/{core-drawer-panel/core-drawer-panel.css → paper-drawer-panel/paper-drawer-panel.css} +33 -51
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
- data/app/assets/components/paper-elements/README.md +21 -0
- data/app/assets/components/paper-elements/bower.json +51 -0
- data/app/assets/components/paper-fab/README.md +44 -0
- data/app/assets/components/paper-fab/bower.json +39 -0
- data/app/assets/components/paper-fab/demo/index.html +93 -0
- data/app/assets/components/paper-fab/index.html +24 -0
- data/app/assets/components/paper-fab/paper-fab.html +119 -140
- data/app/assets/components/paper-fab/test/a11y.html +71 -0
- data/app/assets/components/paper-fab/test/basic.html +76 -0
- data/app/assets/components/paper-fab/test/index.html +26 -0
- data/app/assets/components/paper-header-panel/README.md +105 -0
- data/app/assets/components/paper-header-panel/bower.json +28 -0
- data/app/assets/components/paper-header-panel/demo/index.html +148 -0
- data/app/assets/components/paper-header-panel/hero.svg +38 -0
- data/app/assets/components/paper-header-panel/index.html +36 -0
- data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
- data/app/assets/components/paper-header-panel/test/basic.html +156 -0
- data/app/assets/components/paper-header-panel/test/index.html +34 -0
- data/app/assets/components/paper-icon-button/README.md +49 -0
- data/app/assets/components/paper-icon-button/bower.json +33 -0
- data/app/assets/components/paper-icon-button/demo/index.html +154 -0
- data/app/assets/components/paper-icon-button/index.html +23 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.html +86 -99
- data/app/assets/components/paper-icon-button/test/a11y.html +69 -0
- data/app/assets/components/paper-icon-button/test/basic.html +77 -0
- data/app/assets/components/paper-icon-button/test/index.html +26 -0
- data/app/assets/components/paper-input/README.md +5 -0
- data/app/assets/components/{core-menu/core-menu.css → paper-input/all-imports.html} +6 -12
- data/app/assets/components/paper-input/bower.json +44 -0
- data/app/assets/components/paper-input/demo/index.html +96 -0
- data/app/assets/components/paper-input/demo/ssn-input.html +94 -0
- data/app/assets/components/paper-input/demo/ssn-validator.html +31 -0
- data/app/assets/components/paper-input/hero.svg +19 -0
- data/app/assets/components/paper-input/index.html +28 -0
- data/app/assets/components/paper-input/paper-input-addon-behavior.html +47 -0
- data/app/assets/components/paper-input/paper-input-behavior.html +317 -0
- data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
- data/app/assets/components/paper-input/paper-input-container.html +495 -0
- data/app/assets/components/paper-input/paper-input-error.html +99 -0
- data/app/assets/components/paper-input/paper-input.html +96 -115
- data/app/assets/components/paper-input/paper-textarea.html +106 -0
- data/app/assets/components/paper-input/test/index.html +28 -0
- data/app/assets/components/paper-input/test/letters-only.html +30 -0
- data/app/assets/components/paper-input/test/paper-input-char-counter.html +112 -0
- data/app/assets/components/paper-input/test/paper-input-container.html +237 -0
- data/app/assets/components/paper-input/test/paper-input-error.html +60 -0
- data/app/assets/components/paper-input/test/paper-input.html +213 -0
- data/app/assets/components/paper-input/test/paper-textarea.html +169 -0
- data/app/assets/components/paper-item/README.md +4 -0
- data/app/assets/components/{font-roboto/roboto.html → paper-item/all-imports.html} +6 -2
- data/app/assets/components/paper-item/bower.json +40 -0
- data/app/assets/components/paper-item/demo/index.html +285 -0
- data/app/assets/components/paper-item/index.html +30 -0
- data/app/assets/components/paper-item/paper-icon-item.html +86 -0
- data/app/assets/components/paper-item/paper-item-body.html +93 -0
- data/app/assets/components/{core-animation/web-animations.html → paper-item/paper-item-shared.css} +13 -4
- data/app/assets/components/paper-item/paper-item.html +66 -117
- data/app/assets/components/paper-item/test/index.html +34 -0
- data/app/assets/components/paper-item/test/paper-item.html +66 -0
- data/app/assets/components/paper-material/README.md +13 -0
- data/app/assets/components/paper-material/bower.json +36 -0
- data/app/assets/components/paper-material/demo/index.html +113 -0
- data/app/assets/components/paper-material/index.html +30 -0
- data/app/assets/components/paper-material/paper-material.html +98 -0
- data/app/assets/components/paper-material/test/index.html +25 -0
- data/app/assets/components/paper-material/test/paper-material.html +92 -0
- data/app/assets/components/paper-menu/README.md +3 -0
- data/app/assets/components/paper-menu/bower.json +32 -0
- data/app/assets/components/paper-menu/demo/index.html +81 -0
- data/app/assets/components/paper-menu/hero.svg +35 -0
- data/app/assets/components/paper-menu/index.html +30 -0
- data/app/assets/components/paper-menu/paper-menu.html +133 -0
- data/app/assets/components/paper-menu/test/index.html +34 -0
- data/app/assets/components/paper-menu/test/paper-menu.html +67 -0
- data/app/assets/components/paper-progress/README.md +47 -0
- data/app/assets/components/paper-progress/bower.json +31 -0
- data/app/assets/components/paper-progress/demo/index.html +122 -0
- data/app/assets/components/paper-progress/hero.svg +21 -0
- data/app/assets/components/paper-progress/index.html +28 -0
- data/app/assets/components/paper-progress/paper-progress.html +153 -78
- data/app/assets/components/paper-progress/test/basic.html +121 -0
- data/app/assets/components/paper-progress/test/index.html +25 -0
- data/app/assets/components/paper-radio-button/README.md +29 -0
- data/app/assets/components/paper-radio-button/bower.json +35 -0
- data/app/assets/components/paper-radio-button/demo/index.html +94 -0
- data/app/assets/components/paper-radio-button/hero.svg +22 -0
- data/app/assets/components/paper-radio-button/index.html +29 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.css +26 -25
- data/app/assets/components/paper-radio-button/paper-radio-button.html +123 -141
- data/app/assets/components/paper-radio-button/test/basic.html +101 -0
- data/app/assets/components/paper-radio-button/test/index.html +24 -0
- data/app/assets/components/paper-radio-group/README.md +20 -0
- data/app/assets/components/paper-radio-group/bower.json +36 -0
- data/app/assets/components/paper-radio-group/demo/index.html +108 -0
- data/app/assets/components/paper-radio-group/hero.svg +25 -0
- data/app/assets/components/paper-radio-group/index.html +30 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html +153 -68
- data/app/assets/components/paper-radio-group/test/basic.html +167 -0
- data/app/assets/components/paper-radio-group/test/index.html +25 -0
- data/app/assets/components/paper-ripple/README.md +65 -0
- data/app/assets/components/paper-ripple/bower.json +29 -0
- data/app/assets/components/paper-ripple/demo/index.html +413 -0
- data/app/assets/components/paper-ripple/hero.svg +30 -0
- data/app/assets/components/paper-ripple/index.html +27 -0
- data/app/assets/components/paper-ripple/paper-ripple.html +552 -315
- data/app/assets/components/paper-ripple/test/index.html +25 -0
- data/app/assets/components/paper-ripple/test/paper-ripple.html +166 -0
- data/app/assets/components/paper-scroll-header-panel/README.md +56 -0
- data/app/assets/components/paper-scroll-header-panel/bower.json +38 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo1.html +81 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo2.html +78 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo3.html +79 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo4.html +108 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo5.html +107 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo6.html +112 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo7.html +114 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo8.html +125 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo9.html +105 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg2.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg3.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg5.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg6.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg9.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/index.html +107 -0
- data/app/assets/components/paper-scroll-header-panel/demo/lorem-ipsum.html +42 -0
- data/app/assets/components/paper-scroll-header-panel/demo/sample-content.html +72 -0
- data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
- data/app/assets/components/paper-scroll-header-panel/index.html +28 -0
- data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
- data/app/assets/components/paper-scroll-header-panel/test/basic.html +112 -0
- data/app/assets/components/paper-scroll-header-panel/test/index.html +25 -0
- data/app/assets/components/paper-slider/README.md +69 -0
- data/app/assets/components/paper-slider/bower.json +34 -0
- data/app/assets/components/paper-slider/demo/index.html +113 -0
- data/app/assets/components/paper-slider/hero.svg +20 -0
- data/app/assets/components/paper-slider/index.html +29 -0
- data/app/assets/components/paper-slider/paper-slider.css +39 -26
- data/app/assets/components/paper-slider/paper-slider.html +305 -228
- data/app/assets/components/paper-slider/test/basic.html +139 -0
- data/app/assets/components/paper-slider/test/index.html +25 -0
- data/app/assets/components/paper-spinner/README.md +45 -0
- data/app/assets/components/paper-spinner/bower.json +33 -0
- data/app/assets/components/paper-spinner/demo/index.html +98 -0
- data/app/assets/components/paper-spinner/hero.svg +27 -0
- data/app/assets/components/paper-spinner/index.html +30 -0
- data/app/assets/components/paper-spinner/paper-spinner.css +42 -40
- data/app/assets/components/paper-spinner/paper-spinner.html +168 -103
- data/app/assets/components/paper-spinner/test/index.html +34 -0
- data/app/assets/components/paper-spinner/test/paper-spinner.html +63 -0
- data/app/assets/components/paper-styles/README.md +3 -0
- data/app/assets/components/paper-styles/bower.json +27 -0
- data/app/assets/components/paper-styles/classes/global.html +96 -0
- data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
- data/app/assets/components/paper-styles/classes/shadow.html +39 -0
- data/app/assets/components/paper-styles/classes/typography.html +171 -0
- data/app/assets/components/paper-styles/color.html +333 -0
- data/app/assets/components/paper-styles/default-theme.html +39 -0
- data/app/assets/components/paper-styles/demo-pages.html +72 -0
- data/app/assets/components/paper-styles/demo.css +25 -0
- data/app/assets/components/{paper-dropdown/paper-dropdown-transition.css → paper-styles/paper-styles-classes.html} +8 -9
- data/app/assets/components/paper-styles/paper-styles.html +17 -0
- data/app/assets/components/paper-styles/shadow.html +61 -0
- data/app/assets/components/paper-styles/typography.html +240 -0
- data/app/assets/components/paper-tabs/README.md +56 -0
- data/app/assets/components/paper-tabs/bower.json +37 -0
- data/app/assets/components/paper-tabs/demo/index.html +177 -0
- data/app/assets/components/paper-tabs/hero.svg +23 -0
- data/app/assets/components/paper-tabs/index.html +25 -0
- data/app/assets/components/paper-tabs/paper-tab.html +122 -46
- data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
- data/app/assets/components/paper-tabs/paper-tabs.html +387 -257
- data/app/assets/components/paper-tabs/test/attr-for-selected.html +82 -0
- data/app/assets/components/paper-tabs/test/basic.html +157 -0
- data/app/assets/components/paper-tabs/test/index.html +32 -0
- data/app/assets/components/paper-toast/README.md +4 -0
- data/app/assets/components/paper-toast/bower.json +28 -0
- data/app/assets/components/paper-toast/demo/index.html +56 -0
- data/app/assets/components/paper-toast/hero.svg +20 -0
- data/app/assets/components/paper-toast/index.html +26 -0
- data/app/assets/components/paper-toast/paper-toast.html +133 -265
- data/app/assets/components/paper-toggle-button/README.md +26 -0
- data/app/assets/components/paper-toggle-button/bower.json +36 -0
- data/app/assets/components/paper-toggle-button/demo/index.html +106 -0
- data/app/assets/components/paper-toggle-button/hero.svg +22 -0
- data/app/assets/components/paper-toggle-button/index.html +26 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +36 -23
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html +152 -148
- data/app/assets/components/paper-toggle-button/test/basic.html +86 -0
- data/app/assets/components/paper-toggle-button/test/index.html +25 -0
- data/app/assets/components/paper-toolbar/README.md +51 -0
- data/app/assets/components/paper-toolbar/bower.json +35 -0
- data/app/assets/components/paper-toolbar/demo/index.html +81 -0
- data/app/assets/components/paper-toolbar/index.html +38 -0
- data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
- data/app/assets/components/paper-toolbar/test/index.html +24 -0
- data/app/assets/components/paper-toolbar/test/paper-toolbar.html +147 -0
- data/app/assets/components/polymer/LICENSE.txt +27 -0
- data/app/assets/components/polymer/bower.json +26 -0
- data/app/assets/components/polymer/build.log +27 -0
- data/app/assets/components/polymer/polymer-micro.html +523 -0
- data/app/assets/components/polymer/polymer-mini.html +1368 -0
- data/app/assets/components/polymer/polymer.html +3768 -0
- data/app/assets/components/web-animations-js/COPYING +202 -0
- data/app/assets/components/web-animations-js/History.md +108 -0
- data/app/assets/components/web-animations-js/README.md +161 -0
- data/app/assets/components/web-animations-js/bower.json +31 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations-next.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations.html +50 -0
- data/app/assets/components/web-animations-js/web-animations.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations.min.js.gz +0 -0
- data/app/assets/components/web-animations-js/web-animations.min.js.map +1 -0
- data/app/assets/components/webcomponentsjs/CustomElements.js +343 -21
- data/app/assets/components/webcomponentsjs/CustomElements.min.js +2 -2
- data/app/assets/components/webcomponentsjs/HTMLImports.js +348 -34
- data/app/assets/components/webcomponentsjs/HTMLImports.min.js +2 -2
- data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
- data/app/assets/components/webcomponentsjs/README.md +125 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.js +230 -93
- data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +6 -4
- data/app/assets/components/webcomponentsjs/bower.json +14 -0
- data/app/assets/components/webcomponentsjs/build.log +33 -0
- data/app/assets/components/webcomponentsjs/package.json +1 -1
- data/app/assets/components/webcomponentsjs/webcomponents-lite.js +671 -99
- data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +4 -2
- data/app/assets/components/webcomponentsjs/webcomponents.js +1149 -151
- data/app/assets/components/webcomponentsjs/webcomponents.min.js +6 -5
- data/lib/polymer-paper-rails/version.rb +1 -1
- metadata +532 -130
- data/app/assets/components/core-a11y-keys/core-a11y-keys.html +0 -335
- data/app/assets/components/core-animation/core-animation-group.html +0 -169
- data/app/assets/components/core-animation/core-animation.html +0 -525
- data/app/assets/components/core-collapse/core-collapse.html +0 -298
- data/app/assets/components/core-component-page/bowager-logo.png +0 -0
- data/app/assets/components/core-component-page/core-component-page.html +0 -37
- data/app/assets/components/core-drawer-panel/core-drawer-panel.html +0 -418
- data/app/assets/components/core-drawer-panel/metadata.html +0 -37
- data/app/assets/components/core-dropdown/core-dropdown-base.html +0 -117
- data/app/assets/components/core-dropdown/core-dropdown.html +0 -311
- data/app/assets/components/core-field/core-field.css +0 -38
- data/app/assets/components/core-field/core-field.html +0 -35
- data/app/assets/components/core-field/metadata.html +0 -26
- data/app/assets/components/core-focusable/core-focusable.html +0 -4
- data/app/assets/components/core-focusable/core-focusable.js +0 -134
- data/app/assets/components/core-focusable/polymer-mixin.js +0 -35
- data/app/assets/components/core-header-panel/core-header-panel.css +0 -78
- data/app/assets/components/core-header-panel/core-header-panel.html +0 -277
- data/app/assets/components/core-header-panel/metadata.html +0 -37
- data/app/assets/components/core-icon/core-icon.css +0 -16
- data/app/assets/components/core-icon/core-icon.html +0 -201
- data/app/assets/components/core-icon/metadata.html +0 -21
- data/app/assets/components/core-icon-button/core-icon-button.css +0 -75
- data/app/assets/components/core-icon-button/core-icon-button.html +0 -81
- data/app/assets/components/core-icon-button/metadata.html +0 -20
- data/app/assets/components/core-iconset/core-iconset.html +0 -241
- data/app/assets/components/core-iconset/my-icons-big.png +0 -0
- data/app/assets/components/core-iconset/my-icons.png +0 -0
- data/app/assets/components/core-iconset-svg/core-iconset-svg.html +0 -168
- data/app/assets/components/core-input/core-input.css +0 -41
- data/app/assets/components/core-input/core-input.html +0 -148
- data/app/assets/components/core-input/metadata.html +0 -23
- data/app/assets/components/core-item/core-item.css +0 -45
- data/app/assets/components/core-item/core-item.html +0 -73
- data/app/assets/components/core-item/metadata.html +0 -24
- data/app/assets/components/core-media-query/core-media-query.html +0 -87
- data/app/assets/components/core-menu/core-menu.html +0 -73
- data/app/assets/components/core-menu/core-submenu.html +0 -126
- data/app/assets/components/core-menu/metadata.html +0 -62
- data/app/assets/components/core-meta/core-meta.html +0 -145
- data/app/assets/components/core-overlay/core-overlay-layer.html +0 -116
- data/app/assets/components/core-overlay/core-overlay.html +0 -776
- data/app/assets/components/core-overlay/gulpfile.js +0 -2
- data/app/assets/components/core-range/core-range.html +0 -108
- data/app/assets/components/core-resizable/core-resizable.html +0 -248
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.css +0 -58
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +0 -360
- data/app/assets/components/core-scroll-header-panel/metadata.html +0 -41
- data/app/assets/components/core-selection/core-selection.html +0 -149
- data/app/assets/components/core-selector/core-selector.html +0 -548
- data/app/assets/components/core-selector/metadata.html +0 -20
- data/app/assets/components/core-style/core-style.html +0 -387
- data/app/assets/components/core-style/elements.html +0 -55
- data/app/assets/components/core-style/my-theme.html +0 -73
- data/app/assets/components/core-toolbar/core-toolbar.css +0 -117
- data/app/assets/components/core-toolbar/core-toolbar.html +0 -155
- data/app/assets/components/core-toolbar/metadata.html +0 -28
- data/app/assets/components/core-transition/core-transition-css.html +0 -220
- data/app/assets/components/core-transition/core-transition-overlay.css +0 -46
- data/app/assets/components/core-transition/core-transition.html +0 -140
- data/app/assets/components/paper-button/metadata.html +0 -17
- data/app/assets/components/paper-button/paper-button-base.html +0 -164
- data/app/assets/components/paper-dialog/paper-action-dialog.html +0 -104
- data/app/assets/components/paper-dialog/paper-dialog-base.html +0 -81
- data/app/assets/components/paper-dialog/paper-dialog-transition.css +0 -59
- data/app/assets/components/paper-dialog/paper-dialog-transition.html +0 -27
- data/app/assets/components/paper-dropdown/paper-dropdown-transition.html +0 -166
- data/app/assets/components/paper-dropdown/paper-dropdown.html +0 -117
- data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.css +0 -44
- data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +0 -184
- data/app/assets/components/paper-elements/metadata.html +0 -23
- data/app/assets/components/paper-elements/paper-elements.html +0 -40
- data/app/assets/components/paper-fab/metadata.html +0 -36
- data/app/assets/components/paper-input/metadata.html +0 -20
- data/app/assets/components/paper-input/paper-autogrow-textarea.html +0 -162
- data/app/assets/components/paper-input/paper-char-counter.html +0 -121
- data/app/assets/components/paper-input/paper-input-decorator.css +0 -132
- data/app/assets/components/paper-input/paper-input-decorator.html +0 -547
- data/app/assets/components/paper-item/metadata.html +0 -23
- data/app/assets/components/paper-menu-button/metadata.html +0 -21
- data/app/assets/components/paper-menu-button/paper-menu-button.css +0 -101
- data/app/assets/components/paper-menu-button/paper-menu-button.html +0 -79
- data/app/assets/components/paper-progress/metadata.html +0 -17
- data/app/assets/components/paper-progress/paper-progress.css +0 -68
- data/app/assets/components/paper-radio-button/metadata.html +0 -17
- data/app/assets/components/paper-radio-group/metadata.html +0 -22
- data/app/assets/components/paper-ripple/metadata.html +0 -20
- data/app/assets/components/paper-shadow/metadata.html +0 -17
- data/app/assets/components/paper-shadow/paper-shadow.css +0 -66
- data/app/assets/components/paper-shadow/paper-shadow.html +0 -86
- data/app/assets/components/paper-slider/metadata.html +0 -20
- data/app/assets/components/paper-tabs/metadata.html +0 -58
- data/app/assets/components/paper-tabs/paper-tab.css +0 -59
- data/app/assets/components/paper-tabs/paper-tabs.css +0 -80
- data/app/assets/components/paper-toast/metadata.html +0 -20
- data/app/assets/components/paper-toast/paper-toast.css +0 -80
- data/app/assets/components/paper-toggle-button/metadata.html +0 -17
- data/app/assets/components/sampler-scaffold/sampler-scaffold.css +0 -158
- data/app/assets/components/sampler-scaffold/sampler-scaffold.html +0 -224
@@ -7,7 +7,7 @@
|
|
7
7
|
* Code distributed by Google as part of the polymer project is also
|
8
8
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
9
9
|
*/
|
10
|
-
// @version 0.
|
10
|
+
// @version 0.7.3
|
11
11
|
window.WebComponents = window.WebComponents || {};
|
12
12
|
|
13
13
|
(function(scope) {
|
@@ -15,9 +15,12 @@ window.WebComponents = window.WebComponents || {};
|
|
15
15
|
var file = "webcomponents.js";
|
16
16
|
var script = document.querySelector('script[src*="' + file + '"]');
|
17
17
|
if (!flags.noOpts) {
|
18
|
-
location.search.slice(1).split("&").forEach(function(
|
19
|
-
|
20
|
-
|
18
|
+
location.search.slice(1).split("&").forEach(function(option) {
|
19
|
+
var parts = option.split("=");
|
20
|
+
var match;
|
21
|
+
if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {
|
22
|
+
flags[match[1]] = parts[1] || true;
|
23
|
+
}
|
21
24
|
});
|
22
25
|
if (script) {
|
23
26
|
for (var i = 0, a; a = script.attributes[i]; i++) {
|
@@ -26,7 +29,7 @@ window.WebComponents = window.WebComponents || {};
|
|
26
29
|
}
|
27
30
|
}
|
28
31
|
}
|
29
|
-
if (flags.log) {
|
32
|
+
if (flags.log && flags.log.split) {
|
30
33
|
var parts = flags.log.split(",");
|
31
34
|
flags.log = {};
|
32
35
|
parts.forEach(function(f) {
|
@@ -155,7 +158,7 @@ if (WebComponents.flags.shadow) {
|
|
155
158
|
defineProperty(object, name, nonEnumerableDataDescriptor);
|
156
159
|
}
|
157
160
|
getOwnPropertyNames(window);
|
158
|
-
function getWrapperConstructor(node) {
|
161
|
+
function getWrapperConstructor(node, opt_instance) {
|
159
162
|
var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
|
160
163
|
if (isFirefox) {
|
161
164
|
try {
|
@@ -168,7 +171,7 @@ if (WebComponents.flags.shadow) {
|
|
168
171
|
if (wrapperConstructor) return wrapperConstructor;
|
169
172
|
var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
|
170
173
|
var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
|
171
|
-
registerInternal(nativePrototype, GeneratedWrapper,
|
174
|
+
registerInternal(nativePrototype, GeneratedWrapper, opt_instance);
|
172
175
|
return GeneratedWrapper;
|
173
176
|
}
|
174
177
|
function addForwardingProperties(nativePrototype, wrapperPrototype) {
|
@@ -188,7 +191,7 @@ if (WebComponents.flags.shadow) {
|
|
188
191
|
return /^on[a-z]+$/.test(name);
|
189
192
|
}
|
190
193
|
function isIdentifierName(name) {
|
191
|
-
return
|
194
|
+
return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
|
192
195
|
}
|
193
196
|
function getGetter(name) {
|
194
197
|
return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {
|
@@ -228,8 +231,10 @@ if (WebComponents.flags.shadow) {
|
|
228
231
|
}
|
229
232
|
var descriptor = getDescriptor(source, name);
|
230
233
|
var getter, setter;
|
231
|
-
if (
|
232
|
-
|
234
|
+
if (typeof descriptor.value === "function") {
|
235
|
+
if (allowMethod) {
|
236
|
+
target[name] = getMethod(name);
|
237
|
+
}
|
233
238
|
continue;
|
234
239
|
}
|
235
240
|
var isEvent = isEventHandlerName(name);
|
@@ -247,6 +252,9 @@ if (WebComponents.flags.shadow) {
|
|
247
252
|
}
|
248
253
|
}
|
249
254
|
function register(nativeConstructor, wrapperConstructor, opt_instance) {
|
255
|
+
if (nativeConstructor == null) {
|
256
|
+
return;
|
257
|
+
}
|
250
258
|
var nativePrototype = nativeConstructor.prototype;
|
251
259
|
registerInternal(nativePrototype, wrapperConstructor, opt_instance);
|
252
260
|
mixinStatics(wrapperConstructor, nativeConstructor);
|
@@ -289,7 +297,11 @@ if (WebComponents.flags.shadow) {
|
|
289
297
|
function wrap(impl) {
|
290
298
|
if (impl === null) return null;
|
291
299
|
assert(isNative(impl));
|
292
|
-
|
300
|
+
var wrapper = impl.__wrapper8e3dd93a60__;
|
301
|
+
if (wrapper != null) {
|
302
|
+
return wrapper;
|
303
|
+
}
|
304
|
+
return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);
|
293
305
|
}
|
294
306
|
function unwrap(wrapper) {
|
295
307
|
if (wrapper === null) return null;
|
@@ -344,6 +356,7 @@ if (WebComponents.flags.shadow) {
|
|
344
356
|
scope.defineGetter = defineGetter;
|
345
357
|
scope.defineWrapGetter = defineWrapGetter;
|
346
358
|
scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
|
359
|
+
scope.isIdentifierName = isIdentifierName;
|
347
360
|
scope.isWrapper = isWrapper;
|
348
361
|
scope.isWrapperFor = isWrapperFor;
|
349
362
|
scope.mixin = mixin;
|
@@ -1764,6 +1777,7 @@ if (WebComponents.flags.shadow) {
|
|
1764
1777
|
var OriginalDocumentFragment = window.DocumentFragment;
|
1765
1778
|
var originalAppendChild = OriginalNode.prototype.appendChild;
|
1766
1779
|
var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;
|
1780
|
+
var originalIsEqualNode = OriginalNode.prototype.isEqualNode;
|
1767
1781
|
var originalInsertBefore = OriginalNode.prototype.insertBefore;
|
1768
1782
|
var originalRemoveChild = OriginalNode.prototype.removeChild;
|
1769
1783
|
var originalReplaceChild = OriginalNode.prototype.replaceChild;
|
@@ -1992,6 +2006,9 @@ if (WebComponents.flags.shadow) {
|
|
1992
2006
|
compareDocumentPosition: function(otherNode) {
|
1993
2007
|
return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
|
1994
2008
|
},
|
2009
|
+
isEqualNode: function(otherNode) {
|
2010
|
+
return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
|
2011
|
+
},
|
1995
2012
|
normalize: function() {
|
1996
2013
|
var nodes = snapshotNodeList(this.childNodes);
|
1997
2014
|
var remNodes = [];
|
@@ -2068,10 +2085,10 @@ if (WebComponents.flags.shadow) {
|
|
2068
2085
|
return index;
|
2069
2086
|
}
|
2070
2087
|
function shimSelector(selector) {
|
2071
|
-
return String(selector).replace(/\/deep\/|::shadow
|
2088
|
+
return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");
|
2072
2089
|
}
|
2073
2090
|
function shimMatchesSelector(selector) {
|
2074
|
-
return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content
|
2091
|
+
return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");
|
2075
2092
|
}
|
2076
2093
|
function findOne(node, selector) {
|
2077
2094
|
var m, el = node.firstElementChild;
|
@@ -2275,7 +2292,14 @@ if (WebComponents.flags.shadow) {
|
|
2275
2292
|
return backwardsElement(this.previousSibling);
|
2276
2293
|
}
|
2277
2294
|
};
|
2295
|
+
var NonElementParentNodeInterface = {
|
2296
|
+
getElementById: function(id) {
|
2297
|
+
if (/[ \t\n\r\f]/.test(id)) return null;
|
2298
|
+
return this.querySelector('[id="' + id + '"]');
|
2299
|
+
}
|
2300
|
+
};
|
2278
2301
|
scope.ChildNodeInterface = ChildNodeInterface;
|
2302
|
+
scope.NonElementParentNodeInterface = NonElementParentNodeInterface;
|
2279
2303
|
scope.ParentNodeInterface = ParentNodeInterface;
|
2280
2304
|
})(window.ShadowDOMPolyfill);
|
2281
2305
|
(function(scope) {
|
@@ -2292,6 +2316,12 @@ if (WebComponents.flags.shadow) {
|
|
2292
2316
|
}
|
2293
2317
|
CharacterData.prototype = Object.create(Node.prototype);
|
2294
2318
|
mixin(CharacterData.prototype, {
|
2319
|
+
get nodeValue() {
|
2320
|
+
return this.data;
|
2321
|
+
},
|
2322
|
+
set nodeValue(data) {
|
2323
|
+
this.data = data;
|
2324
|
+
},
|
2295
2325
|
get textContent() {
|
2296
2326
|
return this.data;
|
2297
2327
|
},
|
@@ -2545,6 +2575,12 @@ if (WebComponents.flags.shadow) {
|
|
2545
2575
|
}
|
2546
2576
|
var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);
|
2547
2577
|
var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);
|
2578
|
+
var XHTML_NS = "http://www.w3.org/1999/xhtml";
|
2579
|
+
function needsSelfClosingSlash(node) {
|
2580
|
+
if (node.namespaceURI !== XHTML_NS) return true;
|
2581
|
+
var doctype = node.ownerDocument.doctype;
|
2582
|
+
return doctype && doctype.publicId && doctype.systemId;
|
2583
|
+
}
|
2548
2584
|
function getOuterHTML(node, parentNode) {
|
2549
2585
|
switch (node.nodeType) {
|
2550
2586
|
case Node.ELEMENT_NODE:
|
@@ -2554,9 +2590,11 @@ if (WebComponents.flags.shadow) {
|
|
2554
2590
|
for (var i = 0, attr; attr = attrs[i]; i++) {
|
2555
2591
|
s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';
|
2556
2592
|
}
|
2557
|
-
|
2558
|
-
|
2559
|
-
|
2593
|
+
if (voidElements[tagName]) {
|
2594
|
+
if (needsSelfClosingSlash(node)) s += "/";
|
2595
|
+
return s + ">";
|
2596
|
+
}
|
2597
|
+
return s + ">" + getInnerHTML(node) + "</" + tagName + ">";
|
2560
2598
|
|
2561
2599
|
case Node.TEXT_NODE:
|
2562
2600
|
var data = node.data;
|
@@ -3269,6 +3307,71 @@ if (WebComponents.flags.shadow) {
|
|
3269
3307
|
registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
|
3270
3308
|
scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
|
3271
3309
|
})(window.ShadowDOMPolyfill);
|
3310
|
+
(function(scope) {
|
3311
|
+
"use strict";
|
3312
|
+
var GetElementsByInterface = scope.GetElementsByInterface;
|
3313
|
+
var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
|
3314
|
+
var ParentNodeInterface = scope.ParentNodeInterface;
|
3315
|
+
var SelectorsInterface = scope.SelectorsInterface;
|
3316
|
+
var mixin = scope.mixin;
|
3317
|
+
var registerObject = scope.registerObject;
|
3318
|
+
var DocumentFragment = registerObject(document.createDocumentFragment());
|
3319
|
+
mixin(DocumentFragment.prototype, ParentNodeInterface);
|
3320
|
+
mixin(DocumentFragment.prototype, SelectorsInterface);
|
3321
|
+
mixin(DocumentFragment.prototype, GetElementsByInterface);
|
3322
|
+
mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
|
3323
|
+
var Comment = registerObject(document.createComment(""));
|
3324
|
+
scope.wrappers.Comment = Comment;
|
3325
|
+
scope.wrappers.DocumentFragment = DocumentFragment;
|
3326
|
+
})(window.ShadowDOMPolyfill);
|
3327
|
+
(function(scope) {
|
3328
|
+
"use strict";
|
3329
|
+
var DocumentFragment = scope.wrappers.DocumentFragment;
|
3330
|
+
var TreeScope = scope.TreeScope;
|
3331
|
+
var elementFromPoint = scope.elementFromPoint;
|
3332
|
+
var getInnerHTML = scope.getInnerHTML;
|
3333
|
+
var getTreeScope = scope.getTreeScope;
|
3334
|
+
var mixin = scope.mixin;
|
3335
|
+
var rewrap = scope.rewrap;
|
3336
|
+
var setInnerHTML = scope.setInnerHTML;
|
3337
|
+
var unsafeUnwrap = scope.unsafeUnwrap;
|
3338
|
+
var unwrap = scope.unwrap;
|
3339
|
+
var shadowHostTable = new WeakMap();
|
3340
|
+
var nextOlderShadowTreeTable = new WeakMap();
|
3341
|
+
function ShadowRoot(hostWrapper) {
|
3342
|
+
var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
|
3343
|
+
DocumentFragment.call(this, node);
|
3344
|
+
rewrap(node, this);
|
3345
|
+
var oldShadowRoot = hostWrapper.shadowRoot;
|
3346
|
+
nextOlderShadowTreeTable.set(this, oldShadowRoot);
|
3347
|
+
this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
|
3348
|
+
shadowHostTable.set(this, hostWrapper);
|
3349
|
+
}
|
3350
|
+
ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
|
3351
|
+
mixin(ShadowRoot.prototype, {
|
3352
|
+
constructor: ShadowRoot,
|
3353
|
+
get innerHTML() {
|
3354
|
+
return getInnerHTML(this);
|
3355
|
+
},
|
3356
|
+
set innerHTML(value) {
|
3357
|
+
setInnerHTML(this, value);
|
3358
|
+
this.invalidateShadowRenderer();
|
3359
|
+
},
|
3360
|
+
get olderShadowRoot() {
|
3361
|
+
return nextOlderShadowTreeTable.get(this) || null;
|
3362
|
+
},
|
3363
|
+
get host() {
|
3364
|
+
return shadowHostTable.get(this) || null;
|
3365
|
+
},
|
3366
|
+
invalidateShadowRenderer: function() {
|
3367
|
+
return shadowHostTable.get(this).invalidateShadowRenderer();
|
3368
|
+
},
|
3369
|
+
elementFromPoint: function(x, y) {
|
3370
|
+
return elementFromPoint(this, this.ownerDocument, x, y);
|
3371
|
+
}
|
3372
|
+
});
|
3373
|
+
scope.wrappers.ShadowRoot = ShadowRoot;
|
3374
|
+
})(window.ShadowDOMPolyfill);
|
3272
3375
|
(function(scope) {
|
3273
3376
|
"use strict";
|
3274
3377
|
var registerWrapper = scope.registerWrapper;
|
@@ -3277,24 +3380,55 @@ if (WebComponents.flags.shadow) {
|
|
3277
3380
|
var unwrap = scope.unwrap;
|
3278
3381
|
var unwrapIfNeeded = scope.unwrapIfNeeded;
|
3279
3382
|
var wrap = scope.wrap;
|
3383
|
+
var getTreeScope = scope.getTreeScope;
|
3280
3384
|
var OriginalRange = window.Range;
|
3385
|
+
var ShadowRoot = scope.wrappers.ShadowRoot;
|
3386
|
+
function getHost(node) {
|
3387
|
+
var root = getTreeScope(node).root;
|
3388
|
+
if (root instanceof ShadowRoot) {
|
3389
|
+
return root.host;
|
3390
|
+
}
|
3391
|
+
return null;
|
3392
|
+
}
|
3393
|
+
function hostNodeToShadowNode(refNode, offset) {
|
3394
|
+
if (refNode.shadowRoot) {
|
3395
|
+
offset = Math.min(refNode.childNodes.length - 1, offset);
|
3396
|
+
var child = refNode.childNodes[offset];
|
3397
|
+
if (child) {
|
3398
|
+
var insertionPoint = scope.getDestinationInsertionPoints(child);
|
3399
|
+
if (insertionPoint.length > 0) {
|
3400
|
+
var parentNode = insertionPoint[0].parentNode;
|
3401
|
+
if (parentNode.nodeType == Node.ELEMENT_NODE) {
|
3402
|
+
refNode = parentNode;
|
3403
|
+
}
|
3404
|
+
}
|
3405
|
+
}
|
3406
|
+
}
|
3407
|
+
return refNode;
|
3408
|
+
}
|
3409
|
+
function shadowNodeToHostNode(node) {
|
3410
|
+
node = wrap(node);
|
3411
|
+
return getHost(node) || node;
|
3412
|
+
}
|
3281
3413
|
function Range(impl) {
|
3282
3414
|
setWrapper(impl, this);
|
3283
3415
|
}
|
3284
3416
|
Range.prototype = {
|
3285
3417
|
get startContainer() {
|
3286
|
-
return
|
3418
|
+
return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);
|
3287
3419
|
},
|
3288
3420
|
get endContainer() {
|
3289
|
-
return
|
3421
|
+
return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);
|
3290
3422
|
},
|
3291
3423
|
get commonAncestorContainer() {
|
3292
|
-
return
|
3424
|
+
return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);
|
3293
3425
|
},
|
3294
3426
|
setStart: function(refNode, offset) {
|
3427
|
+
refNode = hostNodeToShadowNode(refNode, offset);
|
3295
3428
|
unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);
|
3296
3429
|
},
|
3297
3430
|
setEnd: function(refNode, offset) {
|
3431
|
+
refNode = hostNodeToShadowNode(refNode, offset);
|
3298
3432
|
unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);
|
3299
3433
|
},
|
3300
3434
|
setStartBefore: function(refNode) {
|
@@ -3354,74 +3488,6 @@ if (WebComponents.flags.shadow) {
|
|
3354
3488
|
registerWrapper(window.Range, Range, document.createRange());
|
3355
3489
|
scope.wrappers.Range = Range;
|
3356
3490
|
})(window.ShadowDOMPolyfill);
|
3357
|
-
(function(scope) {
|
3358
|
-
"use strict";
|
3359
|
-
var GetElementsByInterface = scope.GetElementsByInterface;
|
3360
|
-
var ParentNodeInterface = scope.ParentNodeInterface;
|
3361
|
-
var SelectorsInterface = scope.SelectorsInterface;
|
3362
|
-
var mixin = scope.mixin;
|
3363
|
-
var registerObject = scope.registerObject;
|
3364
|
-
var DocumentFragment = registerObject(document.createDocumentFragment());
|
3365
|
-
mixin(DocumentFragment.prototype, ParentNodeInterface);
|
3366
|
-
mixin(DocumentFragment.prototype, SelectorsInterface);
|
3367
|
-
mixin(DocumentFragment.prototype, GetElementsByInterface);
|
3368
|
-
var Comment = registerObject(document.createComment(""));
|
3369
|
-
scope.wrappers.Comment = Comment;
|
3370
|
-
scope.wrappers.DocumentFragment = DocumentFragment;
|
3371
|
-
})(window.ShadowDOMPolyfill);
|
3372
|
-
(function(scope) {
|
3373
|
-
"use strict";
|
3374
|
-
var DocumentFragment = scope.wrappers.DocumentFragment;
|
3375
|
-
var TreeScope = scope.TreeScope;
|
3376
|
-
var elementFromPoint = scope.elementFromPoint;
|
3377
|
-
var getInnerHTML = scope.getInnerHTML;
|
3378
|
-
var getTreeScope = scope.getTreeScope;
|
3379
|
-
var mixin = scope.mixin;
|
3380
|
-
var rewrap = scope.rewrap;
|
3381
|
-
var setInnerHTML = scope.setInnerHTML;
|
3382
|
-
var unsafeUnwrap = scope.unsafeUnwrap;
|
3383
|
-
var unwrap = scope.unwrap;
|
3384
|
-
var shadowHostTable = new WeakMap();
|
3385
|
-
var nextOlderShadowTreeTable = new WeakMap();
|
3386
|
-
var spaceCharRe = /[ \t\n\r\f]/;
|
3387
|
-
function ShadowRoot(hostWrapper) {
|
3388
|
-
var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
|
3389
|
-
DocumentFragment.call(this, node);
|
3390
|
-
rewrap(node, this);
|
3391
|
-
var oldShadowRoot = hostWrapper.shadowRoot;
|
3392
|
-
nextOlderShadowTreeTable.set(this, oldShadowRoot);
|
3393
|
-
this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
|
3394
|
-
shadowHostTable.set(this, hostWrapper);
|
3395
|
-
}
|
3396
|
-
ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
|
3397
|
-
mixin(ShadowRoot.prototype, {
|
3398
|
-
constructor: ShadowRoot,
|
3399
|
-
get innerHTML() {
|
3400
|
-
return getInnerHTML(this);
|
3401
|
-
},
|
3402
|
-
set innerHTML(value) {
|
3403
|
-
setInnerHTML(this, value);
|
3404
|
-
this.invalidateShadowRenderer();
|
3405
|
-
},
|
3406
|
-
get olderShadowRoot() {
|
3407
|
-
return nextOlderShadowTreeTable.get(this) || null;
|
3408
|
-
},
|
3409
|
-
get host() {
|
3410
|
-
return shadowHostTable.get(this) || null;
|
3411
|
-
},
|
3412
|
-
invalidateShadowRenderer: function() {
|
3413
|
-
return shadowHostTable.get(this).invalidateShadowRenderer();
|
3414
|
-
},
|
3415
|
-
elementFromPoint: function(x, y) {
|
3416
|
-
return elementFromPoint(this, this.ownerDocument, x, y);
|
3417
|
-
},
|
3418
|
-
getElementById: function(id) {
|
3419
|
-
if (spaceCharRe.test(id)) return null;
|
3420
|
-
return this.querySelector('[id="' + id + '"]');
|
3421
|
-
}
|
3422
|
-
});
|
3423
|
-
scope.wrappers.ShadowRoot = ShadowRoot;
|
3424
|
-
})(window.ShadowDOMPolyfill);
|
3425
3491
|
(function(scope) {
|
3426
3492
|
"use strict";
|
3427
3493
|
var Element = scope.wrappers.Element;
|
@@ -3874,7 +3940,7 @@ if (WebComponents.flags.shadow) {
|
|
3874
3940
|
return wrap(unsafeUnwrap(this).focusNode);
|
3875
3941
|
},
|
3876
3942
|
addRange: function(range) {
|
3877
|
-
unsafeUnwrap(this).addRange(
|
3943
|
+
unsafeUnwrap(this).addRange(unwrapIfNeeded(range));
|
3878
3944
|
},
|
3879
3945
|
collapse: function(node, index) {
|
3880
3946
|
unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);
|
@@ -3882,9 +3948,6 @@ if (WebComponents.flags.shadow) {
|
|
3882
3948
|
containsNode: function(node, allowPartial) {
|
3883
3949
|
return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);
|
3884
3950
|
},
|
3885
|
-
extend: function(node, offset) {
|
3886
|
-
unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
|
3887
|
-
},
|
3888
3951
|
getRangeAt: function(index) {
|
3889
3952
|
return wrap(unsafeUnwrap(this).getRangeAt(index));
|
3890
3953
|
},
|
@@ -3898,14 +3961,66 @@ if (WebComponents.flags.shadow) {
|
|
3898
3961
|
return unsafeUnwrap(this).toString();
|
3899
3962
|
}
|
3900
3963
|
};
|
3964
|
+
if (OriginalSelection.prototype.extend) {
|
3965
|
+
Selection.prototype.extend = function(node, offset) {
|
3966
|
+
unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
|
3967
|
+
};
|
3968
|
+
}
|
3901
3969
|
registerWrapper(window.Selection, Selection, window.getSelection());
|
3902
3970
|
scope.wrappers.Selection = Selection;
|
3903
3971
|
})(window.ShadowDOMPolyfill);
|
3972
|
+
(function(scope) {
|
3973
|
+
"use strict";
|
3974
|
+
var registerWrapper = scope.registerWrapper;
|
3975
|
+
var setWrapper = scope.setWrapper;
|
3976
|
+
var unsafeUnwrap = scope.unsafeUnwrap;
|
3977
|
+
var unwrapIfNeeded = scope.unwrapIfNeeded;
|
3978
|
+
var wrap = scope.wrap;
|
3979
|
+
var OriginalTreeWalker = window.TreeWalker;
|
3980
|
+
function TreeWalker(impl) {
|
3981
|
+
setWrapper(impl, this);
|
3982
|
+
}
|
3983
|
+
TreeWalker.prototype = {
|
3984
|
+
get root() {
|
3985
|
+
return wrap(unsafeUnwrap(this).root);
|
3986
|
+
},
|
3987
|
+
get currentNode() {
|
3988
|
+
return wrap(unsafeUnwrap(this).currentNode);
|
3989
|
+
},
|
3990
|
+
set currentNode(node) {
|
3991
|
+
unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);
|
3992
|
+
},
|
3993
|
+
get filter() {
|
3994
|
+
return unsafeUnwrap(this).filter;
|
3995
|
+
},
|
3996
|
+
parentNode: function() {
|
3997
|
+
return wrap(unsafeUnwrap(this).parentNode());
|
3998
|
+
},
|
3999
|
+
firstChild: function() {
|
4000
|
+
return wrap(unsafeUnwrap(this).firstChild());
|
4001
|
+
},
|
4002
|
+
lastChild: function() {
|
4003
|
+
return wrap(unsafeUnwrap(this).lastChild());
|
4004
|
+
},
|
4005
|
+
previousSibling: function() {
|
4006
|
+
return wrap(unsafeUnwrap(this).previousSibling());
|
4007
|
+
},
|
4008
|
+
previousNode: function() {
|
4009
|
+
return wrap(unsafeUnwrap(this).previousNode());
|
4010
|
+
},
|
4011
|
+
nextNode: function() {
|
4012
|
+
return wrap(unsafeUnwrap(this).nextNode());
|
4013
|
+
}
|
4014
|
+
};
|
4015
|
+
registerWrapper(OriginalTreeWalker, TreeWalker);
|
4016
|
+
scope.wrappers.TreeWalker = TreeWalker;
|
4017
|
+
})(window.ShadowDOMPolyfill);
|
3904
4018
|
(function(scope) {
|
3905
4019
|
"use strict";
|
3906
4020
|
var GetElementsByInterface = scope.GetElementsByInterface;
|
3907
4021
|
var Node = scope.wrappers.Node;
|
3908
4022
|
var ParentNodeInterface = scope.ParentNodeInterface;
|
4023
|
+
var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
|
3909
4024
|
var Selection = scope.wrappers.Selection;
|
3910
4025
|
var SelectorsInterface = scope.SelectorsInterface;
|
3911
4026
|
var ShadowRoot = scope.wrappers.ShadowRoot;
|
@@ -3940,7 +4055,7 @@ if (WebComponents.flags.shadow) {
|
|
3940
4055
|
return wrap(original.apply(unsafeUnwrap(this), arguments));
|
3941
4056
|
};
|
3942
4057
|
}
|
3943
|
-
[ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode"
|
4058
|
+
[ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod);
|
3944
4059
|
var originalAdoptNode = document.adoptNode;
|
3945
4060
|
function adoptNodeNoRemove(node, doc) {
|
3946
4061
|
originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));
|
@@ -3978,6 +4093,25 @@ if (WebComponents.flags.shadow) {
|
|
3978
4093
|
return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");
|
3979
4094
|
}
|
3980
4095
|
});
|
4096
|
+
var originalCreateTreeWalker = document.createTreeWalker;
|
4097
|
+
var TreeWalkerWrapper = scope.wrappers.TreeWalker;
|
4098
|
+
Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {
|
4099
|
+
var newFilter = null;
|
4100
|
+
if (filter) {
|
4101
|
+
if (filter.acceptNode && typeof filter.acceptNode === "function") {
|
4102
|
+
newFilter = {
|
4103
|
+
acceptNode: function(node) {
|
4104
|
+
return filter.acceptNode(wrap(node));
|
4105
|
+
}
|
4106
|
+
};
|
4107
|
+
} else if (typeof filter === "function") {
|
4108
|
+
newFilter = function(node) {
|
4109
|
+
return filter(wrap(node));
|
4110
|
+
};
|
4111
|
+
}
|
4112
|
+
}
|
4113
|
+
return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));
|
4114
|
+
};
|
3981
4115
|
if (document.registerElement) {
|
3982
4116
|
var originalRegisterElement = document.registerElement;
|
3983
4117
|
Document.prototype.registerElement = function(tagName, object) {
|
@@ -4041,10 +4175,11 @@ if (WebComponents.flags.shadow) {
|
|
4041
4175
|
}
|
4042
4176
|
forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);
|
4043
4177
|
forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);
|
4044
|
-
forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
|
4178
|
+
forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
|
4045
4179
|
mixin(Document.prototype, GetElementsByInterface);
|
4046
4180
|
mixin(Document.prototype, ParentNodeInterface);
|
4047
4181
|
mixin(Document.prototype, SelectorsInterface);
|
4182
|
+
mixin(Document.prototype, NonElementParentNodeInterface);
|
4048
4183
|
mixin(Document.prototype, {
|
4049
4184
|
get implementation() {
|
4050
4185
|
var implementation = implementationTable.get(this);
|
@@ -4063,6 +4198,11 @@ if (WebComponents.flags.shadow) {
|
|
4063
4198
|
function DOMImplementation(impl) {
|
4064
4199
|
setWrapper(impl, this);
|
4065
4200
|
}
|
4201
|
+
var originalCreateDocument = document.implementation.createDocument;
|
4202
|
+
DOMImplementation.prototype.createDocument = function() {
|
4203
|
+
arguments[2] = unwrap(arguments[2]);
|
4204
|
+
return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments));
|
4205
|
+
};
|
4066
4206
|
function wrapImplMethod(constructor, name) {
|
4067
4207
|
var original = document.implementation[name];
|
4068
4208
|
constructor.prototype[name] = function() {
|
@@ -4076,11 +4216,10 @@ if (WebComponents.flags.shadow) {
|
|
4076
4216
|
};
|
4077
4217
|
}
|
4078
4218
|
wrapImplMethod(DOMImplementation, "createDocumentType");
|
4079
|
-
wrapImplMethod(DOMImplementation, "createDocument");
|
4080
4219
|
wrapImplMethod(DOMImplementation, "createHTMLDocument");
|
4081
4220
|
forwardImplMethod(DOMImplementation, "hasFeature");
|
4082
4221
|
registerWrapper(window.DOMImplementation, DOMImplementation);
|
4083
|
-
forwardMethodsToWrapper([ window.DOMImplementation ], [ "
|
4222
|
+
forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]);
|
4084
4223
|
scope.adoptNodeNoRemove = adoptNodeNoRemove;
|
4085
4224
|
scope.wrappers.DOMImplementation = DOMImplementation;
|
4086
4225
|
scope.wrappers.Document = Document;
|
@@ -4555,8 +4694,8 @@ if (WebComponents.flags.shadow) {
|
|
4555
4694
|
}
|
4556
4695
|
}
|
4557
4696
|
};
|
4558
|
-
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([
|
4559
|
-
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [
|
4697
|
+
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
4698
|
+
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
|
4560
4699
|
function stylesToCssText(styles, preserveComments) {
|
4561
4700
|
var cssText = "";
|
4562
4701
|
Array.prototype.forEach.call(styles, function(s) {
|
@@ -4678,7 +4817,7 @@ if (WebComponents.flags.shadow) {
|
|
4678
4817
|
style = elt.ownerDocument.createElement("style");
|
4679
4818
|
style.textContent = elt.__resource;
|
4680
4819
|
}
|
4681
|
-
HTMLImports.path.resolveUrlsInStyle(style);
|
4820
|
+
HTMLImports.path.resolveUrlsInStyle(style, elt.href);
|
4682
4821
|
style.textContent = ShadowCSS.shimStyle(style);
|
4683
4822
|
style.removeAttribute(SHIM_ATTRIBUTE, "");
|
4684
4823
|
style.setAttribute(SHIMMED_ATTRIBUTE, "");
|
@@ -4720,6 +4859,827 @@ if (WebComponents.flags.shadow) {
|
|
4720
4859
|
}
|
4721
4860
|
})(window.WebComponents);
|
4722
4861
|
|
4862
|
+
(function(scope) {
|
4863
|
+
"use strict";
|
4864
|
+
var hasWorkingUrl = false;
|
4865
|
+
if (!scope.forceJURL) {
|
4866
|
+
try {
|
4867
|
+
var u = new URL("b", "http://a");
|
4868
|
+
u.pathname = "c%20d";
|
4869
|
+
hasWorkingUrl = u.href === "http://a/c%20d";
|
4870
|
+
} catch (e) {}
|
4871
|
+
}
|
4872
|
+
if (hasWorkingUrl) return;
|
4873
|
+
var relative = Object.create(null);
|
4874
|
+
relative["ftp"] = 21;
|
4875
|
+
relative["file"] = 0;
|
4876
|
+
relative["gopher"] = 70;
|
4877
|
+
relative["http"] = 80;
|
4878
|
+
relative["https"] = 443;
|
4879
|
+
relative["ws"] = 80;
|
4880
|
+
relative["wss"] = 443;
|
4881
|
+
var relativePathDotMapping = Object.create(null);
|
4882
|
+
relativePathDotMapping["%2e"] = ".";
|
4883
|
+
relativePathDotMapping[".%2e"] = "..";
|
4884
|
+
relativePathDotMapping["%2e."] = "..";
|
4885
|
+
relativePathDotMapping["%2e%2e"] = "..";
|
4886
|
+
function isRelativeScheme(scheme) {
|
4887
|
+
return relative[scheme] !== undefined;
|
4888
|
+
}
|
4889
|
+
function invalid() {
|
4890
|
+
clear.call(this);
|
4891
|
+
this._isInvalid = true;
|
4892
|
+
}
|
4893
|
+
function IDNAToASCII(h) {
|
4894
|
+
if ("" == h) {
|
4895
|
+
invalid.call(this);
|
4896
|
+
}
|
4897
|
+
return h.toLowerCase();
|
4898
|
+
}
|
4899
|
+
function percentEscape(c) {
|
4900
|
+
var unicode = c.charCodeAt(0);
|
4901
|
+
if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
|
4902
|
+
return c;
|
4903
|
+
}
|
4904
|
+
return encodeURIComponent(c);
|
4905
|
+
}
|
4906
|
+
function percentEscapeQuery(c) {
|
4907
|
+
var unicode = c.charCodeAt(0);
|
4908
|
+
if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
|
4909
|
+
return c;
|
4910
|
+
}
|
4911
|
+
return encodeURIComponent(c);
|
4912
|
+
}
|
4913
|
+
var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
|
4914
|
+
function parse(input, stateOverride, base) {
|
4915
|
+
function err(message) {
|
4916
|
+
errors.push(message);
|
4917
|
+
}
|
4918
|
+
var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
|
4919
|
+
loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
|
4920
|
+
var c = input[cursor];
|
4921
|
+
switch (state) {
|
4922
|
+
case "scheme start":
|
4923
|
+
if (c && ALPHA.test(c)) {
|
4924
|
+
buffer += c.toLowerCase();
|
4925
|
+
state = "scheme";
|
4926
|
+
} else if (!stateOverride) {
|
4927
|
+
buffer = "";
|
4928
|
+
state = "no scheme";
|
4929
|
+
continue;
|
4930
|
+
} else {
|
4931
|
+
err("Invalid scheme.");
|
4932
|
+
break loop;
|
4933
|
+
}
|
4934
|
+
break;
|
4935
|
+
|
4936
|
+
case "scheme":
|
4937
|
+
if (c && ALPHANUMERIC.test(c)) {
|
4938
|
+
buffer += c.toLowerCase();
|
4939
|
+
} else if (":" == c) {
|
4940
|
+
this._scheme = buffer;
|
4941
|
+
buffer = "";
|
4942
|
+
if (stateOverride) {
|
4943
|
+
break loop;
|
4944
|
+
}
|
4945
|
+
if (isRelativeScheme(this._scheme)) {
|
4946
|
+
this._isRelative = true;
|
4947
|
+
}
|
4948
|
+
if ("file" == this._scheme) {
|
4949
|
+
state = "relative";
|
4950
|
+
} else if (this._isRelative && base && base._scheme == this._scheme) {
|
4951
|
+
state = "relative or authority";
|
4952
|
+
} else if (this._isRelative) {
|
4953
|
+
state = "authority first slash";
|
4954
|
+
} else {
|
4955
|
+
state = "scheme data";
|
4956
|
+
}
|
4957
|
+
} else if (!stateOverride) {
|
4958
|
+
buffer = "";
|
4959
|
+
cursor = 0;
|
4960
|
+
state = "no scheme";
|
4961
|
+
continue;
|
4962
|
+
} else if (EOF == c) {
|
4963
|
+
break loop;
|
4964
|
+
} else {
|
4965
|
+
err("Code point not allowed in scheme: " + c);
|
4966
|
+
break loop;
|
4967
|
+
}
|
4968
|
+
break;
|
4969
|
+
|
4970
|
+
case "scheme data":
|
4971
|
+
if ("?" == c) {
|
4972
|
+
this._query = "?";
|
4973
|
+
state = "query";
|
4974
|
+
} else if ("#" == c) {
|
4975
|
+
this._fragment = "#";
|
4976
|
+
state = "fragment";
|
4977
|
+
} else {
|
4978
|
+
if (EOF != c && " " != c && "\n" != c && "\r" != c) {
|
4979
|
+
this._schemeData += percentEscape(c);
|
4980
|
+
}
|
4981
|
+
}
|
4982
|
+
break;
|
4983
|
+
|
4984
|
+
case "no scheme":
|
4985
|
+
if (!base || !isRelativeScheme(base._scheme)) {
|
4986
|
+
err("Missing scheme.");
|
4987
|
+
invalid.call(this);
|
4988
|
+
} else {
|
4989
|
+
state = "relative";
|
4990
|
+
continue;
|
4991
|
+
}
|
4992
|
+
break;
|
4993
|
+
|
4994
|
+
case "relative or authority":
|
4995
|
+
if ("/" == c && "/" == input[cursor + 1]) {
|
4996
|
+
state = "authority ignore slashes";
|
4997
|
+
} else {
|
4998
|
+
err("Expected /, got: " + c);
|
4999
|
+
state = "relative";
|
5000
|
+
continue;
|
5001
|
+
}
|
5002
|
+
break;
|
5003
|
+
|
5004
|
+
case "relative":
|
5005
|
+
this._isRelative = true;
|
5006
|
+
if ("file" != this._scheme) this._scheme = base._scheme;
|
5007
|
+
if (EOF == c) {
|
5008
|
+
this._host = base._host;
|
5009
|
+
this._port = base._port;
|
5010
|
+
this._path = base._path.slice();
|
5011
|
+
this._query = base._query;
|
5012
|
+
this._username = base._username;
|
5013
|
+
this._password = base._password;
|
5014
|
+
break loop;
|
5015
|
+
} else if ("/" == c || "\\" == c) {
|
5016
|
+
if ("\\" == c) err("\\ is an invalid code point.");
|
5017
|
+
state = "relative slash";
|
5018
|
+
} else if ("?" == c) {
|
5019
|
+
this._host = base._host;
|
5020
|
+
this._port = base._port;
|
5021
|
+
this._path = base._path.slice();
|
5022
|
+
this._query = "?";
|
5023
|
+
this._username = base._username;
|
5024
|
+
this._password = base._password;
|
5025
|
+
state = "query";
|
5026
|
+
} else if ("#" == c) {
|
5027
|
+
this._host = base._host;
|
5028
|
+
this._port = base._port;
|
5029
|
+
this._path = base._path.slice();
|
5030
|
+
this._query = base._query;
|
5031
|
+
this._fragment = "#";
|
5032
|
+
this._username = base._username;
|
5033
|
+
this._password = base._password;
|
5034
|
+
state = "fragment";
|
5035
|
+
} else {
|
5036
|
+
var nextC = input[cursor + 1];
|
5037
|
+
var nextNextC = input[cursor + 2];
|
5038
|
+
if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
|
5039
|
+
this._host = base._host;
|
5040
|
+
this._port = base._port;
|
5041
|
+
this._username = base._username;
|
5042
|
+
this._password = base._password;
|
5043
|
+
this._path = base._path.slice();
|
5044
|
+
this._path.pop();
|
5045
|
+
}
|
5046
|
+
state = "relative path";
|
5047
|
+
continue;
|
5048
|
+
}
|
5049
|
+
break;
|
5050
|
+
|
5051
|
+
case "relative slash":
|
5052
|
+
if ("/" == c || "\\" == c) {
|
5053
|
+
if ("\\" == c) {
|
5054
|
+
err("\\ is an invalid code point.");
|
5055
|
+
}
|
5056
|
+
if ("file" == this._scheme) {
|
5057
|
+
state = "file host";
|
5058
|
+
} else {
|
5059
|
+
state = "authority ignore slashes";
|
5060
|
+
}
|
5061
|
+
} else {
|
5062
|
+
if ("file" != this._scheme) {
|
5063
|
+
this._host = base._host;
|
5064
|
+
this._port = base._port;
|
5065
|
+
this._username = base._username;
|
5066
|
+
this._password = base._password;
|
5067
|
+
}
|
5068
|
+
state = "relative path";
|
5069
|
+
continue;
|
5070
|
+
}
|
5071
|
+
break;
|
5072
|
+
|
5073
|
+
case "authority first slash":
|
5074
|
+
if ("/" == c) {
|
5075
|
+
state = "authority second slash";
|
5076
|
+
} else {
|
5077
|
+
err("Expected '/', got: " + c);
|
5078
|
+
state = "authority ignore slashes";
|
5079
|
+
continue;
|
5080
|
+
}
|
5081
|
+
break;
|
5082
|
+
|
5083
|
+
case "authority second slash":
|
5084
|
+
state = "authority ignore slashes";
|
5085
|
+
if ("/" != c) {
|
5086
|
+
err("Expected '/', got: " + c);
|
5087
|
+
continue;
|
5088
|
+
}
|
5089
|
+
break;
|
5090
|
+
|
5091
|
+
case "authority ignore slashes":
|
5092
|
+
if ("/" != c && "\\" != c) {
|
5093
|
+
state = "authority";
|
5094
|
+
continue;
|
5095
|
+
} else {
|
5096
|
+
err("Expected authority, got: " + c);
|
5097
|
+
}
|
5098
|
+
break;
|
5099
|
+
|
5100
|
+
case "authority":
|
5101
|
+
if ("@" == c) {
|
5102
|
+
if (seenAt) {
|
5103
|
+
err("@ already seen.");
|
5104
|
+
buffer += "%40";
|
5105
|
+
}
|
5106
|
+
seenAt = true;
|
5107
|
+
for (var i = 0; i < buffer.length; i++) {
|
5108
|
+
var cp = buffer[i];
|
5109
|
+
if (" " == cp || "\n" == cp || "\r" == cp) {
|
5110
|
+
err("Invalid whitespace in authority.");
|
5111
|
+
continue;
|
5112
|
+
}
|
5113
|
+
if (":" == cp && null === this._password) {
|
5114
|
+
this._password = "";
|
5115
|
+
continue;
|
5116
|
+
}
|
5117
|
+
var tempC = percentEscape(cp);
|
5118
|
+
null !== this._password ? this._password += tempC : this._username += tempC;
|
5119
|
+
}
|
5120
|
+
buffer = "";
|
5121
|
+
} else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
|
5122
|
+
cursor -= buffer.length;
|
5123
|
+
buffer = "";
|
5124
|
+
state = "host";
|
5125
|
+
continue;
|
5126
|
+
} else {
|
5127
|
+
buffer += c;
|
5128
|
+
}
|
5129
|
+
break;
|
5130
|
+
|
5131
|
+
case "file host":
|
5132
|
+
if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
|
5133
|
+
if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
|
5134
|
+
state = "relative path";
|
5135
|
+
} else if (buffer.length == 0) {
|
5136
|
+
state = "relative path start";
|
5137
|
+
} else {
|
5138
|
+
this._host = IDNAToASCII.call(this, buffer);
|
5139
|
+
buffer = "";
|
5140
|
+
state = "relative path start";
|
5141
|
+
}
|
5142
|
+
continue;
|
5143
|
+
} else if (" " == c || "\n" == c || "\r" == c) {
|
5144
|
+
err("Invalid whitespace in file host.");
|
5145
|
+
} else {
|
5146
|
+
buffer += c;
|
5147
|
+
}
|
5148
|
+
break;
|
5149
|
+
|
5150
|
+
case "host":
|
5151
|
+
case "hostname":
|
5152
|
+
if (":" == c && !seenBracket) {
|
5153
|
+
this._host = IDNAToASCII.call(this, buffer);
|
5154
|
+
buffer = "";
|
5155
|
+
state = "port";
|
5156
|
+
if ("hostname" == stateOverride) {
|
5157
|
+
break loop;
|
5158
|
+
}
|
5159
|
+
} else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
|
5160
|
+
this._host = IDNAToASCII.call(this, buffer);
|
5161
|
+
buffer = "";
|
5162
|
+
state = "relative path start";
|
5163
|
+
if (stateOverride) {
|
5164
|
+
break loop;
|
5165
|
+
}
|
5166
|
+
continue;
|
5167
|
+
} else if (" " != c && "\n" != c && "\r" != c) {
|
5168
|
+
if ("[" == c) {
|
5169
|
+
seenBracket = true;
|
5170
|
+
} else if ("]" == c) {
|
5171
|
+
seenBracket = false;
|
5172
|
+
}
|
5173
|
+
buffer += c;
|
5174
|
+
} else {
|
5175
|
+
err("Invalid code point in host/hostname: " + c);
|
5176
|
+
}
|
5177
|
+
break;
|
5178
|
+
|
5179
|
+
case "port":
|
5180
|
+
if (/[0-9]/.test(c)) {
|
5181
|
+
buffer += c;
|
5182
|
+
} else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
|
5183
|
+
if ("" != buffer) {
|
5184
|
+
var temp = parseInt(buffer, 10);
|
5185
|
+
if (temp != relative[this._scheme]) {
|
5186
|
+
this._port = temp + "";
|
5187
|
+
}
|
5188
|
+
buffer = "";
|
5189
|
+
}
|
5190
|
+
if (stateOverride) {
|
5191
|
+
break loop;
|
5192
|
+
}
|
5193
|
+
state = "relative path start";
|
5194
|
+
continue;
|
5195
|
+
} else if (" " == c || "\n" == c || "\r" == c) {
|
5196
|
+
err("Invalid code point in port: " + c);
|
5197
|
+
} else {
|
5198
|
+
invalid.call(this);
|
5199
|
+
}
|
5200
|
+
break;
|
5201
|
+
|
5202
|
+
case "relative path start":
|
5203
|
+
if ("\\" == c) err("'\\' not allowed in path.");
|
5204
|
+
state = "relative path";
|
5205
|
+
if ("/" != c && "\\" != c) {
|
5206
|
+
continue;
|
5207
|
+
}
|
5208
|
+
break;
|
5209
|
+
|
5210
|
+
case "relative path":
|
5211
|
+
if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
|
5212
|
+
if ("\\" == c) {
|
5213
|
+
err("\\ not allowed in relative path.");
|
5214
|
+
}
|
5215
|
+
var tmp;
|
5216
|
+
if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
|
5217
|
+
buffer = tmp;
|
5218
|
+
}
|
5219
|
+
if (".." == buffer) {
|
5220
|
+
this._path.pop();
|
5221
|
+
if ("/" != c && "\\" != c) {
|
5222
|
+
this._path.push("");
|
5223
|
+
}
|
5224
|
+
} else if ("." == buffer && "/" != c && "\\" != c) {
|
5225
|
+
this._path.push("");
|
5226
|
+
} else if ("." != buffer) {
|
5227
|
+
if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
|
5228
|
+
buffer = buffer[0] + ":";
|
5229
|
+
}
|
5230
|
+
this._path.push(buffer);
|
5231
|
+
}
|
5232
|
+
buffer = "";
|
5233
|
+
if ("?" == c) {
|
5234
|
+
this._query = "?";
|
5235
|
+
state = "query";
|
5236
|
+
} else if ("#" == c) {
|
5237
|
+
this._fragment = "#";
|
5238
|
+
state = "fragment";
|
5239
|
+
}
|
5240
|
+
} else if (" " != c && "\n" != c && "\r" != c) {
|
5241
|
+
buffer += percentEscape(c);
|
5242
|
+
}
|
5243
|
+
break;
|
5244
|
+
|
5245
|
+
case "query":
|
5246
|
+
if (!stateOverride && "#" == c) {
|
5247
|
+
this._fragment = "#";
|
5248
|
+
state = "fragment";
|
5249
|
+
} else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
|
5250
|
+
this._query += percentEscapeQuery(c);
|
5251
|
+
}
|
5252
|
+
break;
|
5253
|
+
|
5254
|
+
case "fragment":
|
5255
|
+
if (EOF != c && " " != c && "\n" != c && "\r" != c) {
|
5256
|
+
this._fragment += c;
|
5257
|
+
}
|
5258
|
+
break;
|
5259
|
+
}
|
5260
|
+
cursor++;
|
5261
|
+
}
|
5262
|
+
}
|
5263
|
+
function clear() {
|
5264
|
+
this._scheme = "";
|
5265
|
+
this._schemeData = "";
|
5266
|
+
this._username = "";
|
5267
|
+
this._password = null;
|
5268
|
+
this._host = "";
|
5269
|
+
this._port = "";
|
5270
|
+
this._path = [];
|
5271
|
+
this._query = "";
|
5272
|
+
this._fragment = "";
|
5273
|
+
this._isInvalid = false;
|
5274
|
+
this._isRelative = false;
|
5275
|
+
}
|
5276
|
+
function jURL(url, base) {
|
5277
|
+
if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
|
5278
|
+
this._url = url;
|
5279
|
+
clear.call(this);
|
5280
|
+
var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
|
5281
|
+
parse.call(this, input, null, base);
|
5282
|
+
}
|
5283
|
+
jURL.prototype = {
|
5284
|
+
toString: function() {
|
5285
|
+
return this.href;
|
5286
|
+
},
|
5287
|
+
get href() {
|
5288
|
+
if (this._isInvalid) return this._url;
|
5289
|
+
var authority = "";
|
5290
|
+
if ("" != this._username || null != this._password) {
|
5291
|
+
authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
|
5292
|
+
}
|
5293
|
+
return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
|
5294
|
+
},
|
5295
|
+
set href(href) {
|
5296
|
+
clear.call(this);
|
5297
|
+
parse.call(this, href);
|
5298
|
+
},
|
5299
|
+
get protocol() {
|
5300
|
+
return this._scheme + ":";
|
5301
|
+
},
|
5302
|
+
set protocol(protocol) {
|
5303
|
+
if (this._isInvalid) return;
|
5304
|
+
parse.call(this, protocol + ":", "scheme start");
|
5305
|
+
},
|
5306
|
+
get host() {
|
5307
|
+
return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
|
5308
|
+
},
|
5309
|
+
set host(host) {
|
5310
|
+
if (this._isInvalid || !this._isRelative) return;
|
5311
|
+
parse.call(this, host, "host");
|
5312
|
+
},
|
5313
|
+
get hostname() {
|
5314
|
+
return this._host;
|
5315
|
+
},
|
5316
|
+
set hostname(hostname) {
|
5317
|
+
if (this._isInvalid || !this._isRelative) return;
|
5318
|
+
parse.call(this, hostname, "hostname");
|
5319
|
+
},
|
5320
|
+
get port() {
|
5321
|
+
return this._port;
|
5322
|
+
},
|
5323
|
+
set port(port) {
|
5324
|
+
if (this._isInvalid || !this._isRelative) return;
|
5325
|
+
parse.call(this, port, "port");
|
5326
|
+
},
|
5327
|
+
get pathname() {
|
5328
|
+
return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
|
5329
|
+
},
|
5330
|
+
set pathname(pathname) {
|
5331
|
+
if (this._isInvalid || !this._isRelative) return;
|
5332
|
+
this._path = [];
|
5333
|
+
parse.call(this, pathname, "relative path start");
|
5334
|
+
},
|
5335
|
+
get search() {
|
5336
|
+
return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
|
5337
|
+
},
|
5338
|
+
set search(search) {
|
5339
|
+
if (this._isInvalid || !this._isRelative) return;
|
5340
|
+
this._query = "?";
|
5341
|
+
if ("?" == search[0]) search = search.slice(1);
|
5342
|
+
parse.call(this, search, "query");
|
5343
|
+
},
|
5344
|
+
get hash() {
|
5345
|
+
return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
|
5346
|
+
},
|
5347
|
+
set hash(hash) {
|
5348
|
+
if (this._isInvalid) return;
|
5349
|
+
this._fragment = "#";
|
5350
|
+
if ("#" == hash[0]) hash = hash.slice(1);
|
5351
|
+
parse.call(this, hash, "fragment");
|
5352
|
+
},
|
5353
|
+
get origin() {
|
5354
|
+
var host;
|
5355
|
+
if (this._isInvalid || !this._scheme) {
|
5356
|
+
return "";
|
5357
|
+
}
|
5358
|
+
switch (this._scheme) {
|
5359
|
+
case "data":
|
5360
|
+
case "file":
|
5361
|
+
case "javascript":
|
5362
|
+
case "mailto":
|
5363
|
+
return "null";
|
5364
|
+
}
|
5365
|
+
host = this.host;
|
5366
|
+
if (!host) {
|
5367
|
+
return "";
|
5368
|
+
}
|
5369
|
+
return this._scheme + "://" + host;
|
5370
|
+
}
|
5371
|
+
};
|
5372
|
+
var OriginalURL = scope.URL;
|
5373
|
+
if (OriginalURL) {
|
5374
|
+
jURL.createObjectURL = function(blob) {
|
5375
|
+
return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
|
5376
|
+
};
|
5377
|
+
jURL.revokeObjectURL = function(url) {
|
5378
|
+
OriginalURL.revokeObjectURL(url);
|
5379
|
+
};
|
5380
|
+
}
|
5381
|
+
scope.URL = jURL;
|
5382
|
+
})(this);
|
5383
|
+
|
5384
|
+
(function(global) {
|
5385
|
+
var registrationsTable = new WeakMap();
|
5386
|
+
var setImmediate;
|
5387
|
+
if (/Trident|Edge/.test(navigator.userAgent)) {
|
5388
|
+
setImmediate = setTimeout;
|
5389
|
+
} else if (window.setImmediate) {
|
5390
|
+
setImmediate = window.setImmediate;
|
5391
|
+
} else {
|
5392
|
+
var setImmediateQueue = [];
|
5393
|
+
var sentinel = String(Math.random());
|
5394
|
+
window.addEventListener("message", function(e) {
|
5395
|
+
if (e.data === sentinel) {
|
5396
|
+
var queue = setImmediateQueue;
|
5397
|
+
setImmediateQueue = [];
|
5398
|
+
queue.forEach(function(func) {
|
5399
|
+
func();
|
5400
|
+
});
|
5401
|
+
}
|
5402
|
+
});
|
5403
|
+
setImmediate = function(func) {
|
5404
|
+
setImmediateQueue.push(func);
|
5405
|
+
window.postMessage(sentinel, "*");
|
5406
|
+
};
|
5407
|
+
}
|
5408
|
+
var isScheduled = false;
|
5409
|
+
var scheduledObservers = [];
|
5410
|
+
function scheduleCallback(observer) {
|
5411
|
+
scheduledObservers.push(observer);
|
5412
|
+
if (!isScheduled) {
|
5413
|
+
isScheduled = true;
|
5414
|
+
setImmediate(dispatchCallbacks);
|
5415
|
+
}
|
5416
|
+
}
|
5417
|
+
function wrapIfNeeded(node) {
|
5418
|
+
return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
|
5419
|
+
}
|
5420
|
+
function dispatchCallbacks() {
|
5421
|
+
isScheduled = false;
|
5422
|
+
var observers = scheduledObservers;
|
5423
|
+
scheduledObservers = [];
|
5424
|
+
observers.sort(function(o1, o2) {
|
5425
|
+
return o1.uid_ - o2.uid_;
|
5426
|
+
});
|
5427
|
+
var anyNonEmpty = false;
|
5428
|
+
observers.forEach(function(observer) {
|
5429
|
+
var queue = observer.takeRecords();
|
5430
|
+
removeTransientObserversFor(observer);
|
5431
|
+
if (queue.length) {
|
5432
|
+
observer.callback_(queue, observer);
|
5433
|
+
anyNonEmpty = true;
|
5434
|
+
}
|
5435
|
+
});
|
5436
|
+
if (anyNonEmpty) dispatchCallbacks();
|
5437
|
+
}
|
5438
|
+
function removeTransientObserversFor(observer) {
|
5439
|
+
observer.nodes_.forEach(function(node) {
|
5440
|
+
var registrations = registrationsTable.get(node);
|
5441
|
+
if (!registrations) return;
|
5442
|
+
registrations.forEach(function(registration) {
|
5443
|
+
if (registration.observer === observer) registration.removeTransientObservers();
|
5444
|
+
});
|
5445
|
+
});
|
5446
|
+
}
|
5447
|
+
function forEachAncestorAndObserverEnqueueRecord(target, callback) {
|
5448
|
+
for (var node = target; node; node = node.parentNode) {
|
5449
|
+
var registrations = registrationsTable.get(node);
|
5450
|
+
if (registrations) {
|
5451
|
+
for (var j = 0; j < registrations.length; j++) {
|
5452
|
+
var registration = registrations[j];
|
5453
|
+
var options = registration.options;
|
5454
|
+
if (node !== target && !options.subtree) continue;
|
5455
|
+
var record = callback(options);
|
5456
|
+
if (record) registration.enqueue(record);
|
5457
|
+
}
|
5458
|
+
}
|
5459
|
+
}
|
5460
|
+
}
|
5461
|
+
var uidCounter = 0;
|
5462
|
+
function JsMutationObserver(callback) {
|
5463
|
+
this.callback_ = callback;
|
5464
|
+
this.nodes_ = [];
|
5465
|
+
this.records_ = [];
|
5466
|
+
this.uid_ = ++uidCounter;
|
5467
|
+
}
|
5468
|
+
JsMutationObserver.prototype = {
|
5469
|
+
observe: function(target, options) {
|
5470
|
+
target = wrapIfNeeded(target);
|
5471
|
+
if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
|
5472
|
+
throw new SyntaxError();
|
5473
|
+
}
|
5474
|
+
var registrations = registrationsTable.get(target);
|
5475
|
+
if (!registrations) registrationsTable.set(target, registrations = []);
|
5476
|
+
var registration;
|
5477
|
+
for (var i = 0; i < registrations.length; i++) {
|
5478
|
+
if (registrations[i].observer === this) {
|
5479
|
+
registration = registrations[i];
|
5480
|
+
registration.removeListeners();
|
5481
|
+
registration.options = options;
|
5482
|
+
break;
|
5483
|
+
}
|
5484
|
+
}
|
5485
|
+
if (!registration) {
|
5486
|
+
registration = new Registration(this, target, options);
|
5487
|
+
registrations.push(registration);
|
5488
|
+
this.nodes_.push(target);
|
5489
|
+
}
|
5490
|
+
registration.addListeners();
|
5491
|
+
},
|
5492
|
+
disconnect: function() {
|
5493
|
+
this.nodes_.forEach(function(node) {
|
5494
|
+
var registrations = registrationsTable.get(node);
|
5495
|
+
for (var i = 0; i < registrations.length; i++) {
|
5496
|
+
var registration = registrations[i];
|
5497
|
+
if (registration.observer === this) {
|
5498
|
+
registration.removeListeners();
|
5499
|
+
registrations.splice(i, 1);
|
5500
|
+
break;
|
5501
|
+
}
|
5502
|
+
}
|
5503
|
+
}, this);
|
5504
|
+
this.records_ = [];
|
5505
|
+
},
|
5506
|
+
takeRecords: function() {
|
5507
|
+
var copyOfRecords = this.records_;
|
5508
|
+
this.records_ = [];
|
5509
|
+
return copyOfRecords;
|
5510
|
+
}
|
5511
|
+
};
|
5512
|
+
function MutationRecord(type, target) {
|
5513
|
+
this.type = type;
|
5514
|
+
this.target = target;
|
5515
|
+
this.addedNodes = [];
|
5516
|
+
this.removedNodes = [];
|
5517
|
+
this.previousSibling = null;
|
5518
|
+
this.nextSibling = null;
|
5519
|
+
this.attributeName = null;
|
5520
|
+
this.attributeNamespace = null;
|
5521
|
+
this.oldValue = null;
|
5522
|
+
}
|
5523
|
+
function copyMutationRecord(original) {
|
5524
|
+
var record = new MutationRecord(original.type, original.target);
|
5525
|
+
record.addedNodes = original.addedNodes.slice();
|
5526
|
+
record.removedNodes = original.removedNodes.slice();
|
5527
|
+
record.previousSibling = original.previousSibling;
|
5528
|
+
record.nextSibling = original.nextSibling;
|
5529
|
+
record.attributeName = original.attributeName;
|
5530
|
+
record.attributeNamespace = original.attributeNamespace;
|
5531
|
+
record.oldValue = original.oldValue;
|
5532
|
+
return record;
|
5533
|
+
}
|
5534
|
+
var currentRecord, recordWithOldValue;
|
5535
|
+
function getRecord(type, target) {
|
5536
|
+
return currentRecord = new MutationRecord(type, target);
|
5537
|
+
}
|
5538
|
+
function getRecordWithOldValue(oldValue) {
|
5539
|
+
if (recordWithOldValue) return recordWithOldValue;
|
5540
|
+
recordWithOldValue = copyMutationRecord(currentRecord);
|
5541
|
+
recordWithOldValue.oldValue = oldValue;
|
5542
|
+
return recordWithOldValue;
|
5543
|
+
}
|
5544
|
+
function clearRecords() {
|
5545
|
+
currentRecord = recordWithOldValue = undefined;
|
5546
|
+
}
|
5547
|
+
function recordRepresentsCurrentMutation(record) {
|
5548
|
+
return record === recordWithOldValue || record === currentRecord;
|
5549
|
+
}
|
5550
|
+
function selectRecord(lastRecord, newRecord) {
|
5551
|
+
if (lastRecord === newRecord) return lastRecord;
|
5552
|
+
if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
|
5553
|
+
return null;
|
5554
|
+
}
|
5555
|
+
function Registration(observer, target, options) {
|
5556
|
+
this.observer = observer;
|
5557
|
+
this.target = target;
|
5558
|
+
this.options = options;
|
5559
|
+
this.transientObservedNodes = [];
|
5560
|
+
}
|
5561
|
+
Registration.prototype = {
|
5562
|
+
enqueue: function(record) {
|
5563
|
+
var records = this.observer.records_;
|
5564
|
+
var length = records.length;
|
5565
|
+
if (records.length > 0) {
|
5566
|
+
var lastRecord = records[length - 1];
|
5567
|
+
var recordToReplaceLast = selectRecord(lastRecord, record);
|
5568
|
+
if (recordToReplaceLast) {
|
5569
|
+
records[length - 1] = recordToReplaceLast;
|
5570
|
+
return;
|
5571
|
+
}
|
5572
|
+
} else {
|
5573
|
+
scheduleCallback(this.observer);
|
5574
|
+
}
|
5575
|
+
records[length] = record;
|
5576
|
+
},
|
5577
|
+
addListeners: function() {
|
5578
|
+
this.addListeners_(this.target);
|
5579
|
+
},
|
5580
|
+
addListeners_: function(node) {
|
5581
|
+
var options = this.options;
|
5582
|
+
if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
|
5583
|
+
if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
|
5584
|
+
if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
|
5585
|
+
if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
|
5586
|
+
},
|
5587
|
+
removeListeners: function() {
|
5588
|
+
this.removeListeners_(this.target);
|
5589
|
+
},
|
5590
|
+
removeListeners_: function(node) {
|
5591
|
+
var options = this.options;
|
5592
|
+
if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
|
5593
|
+
if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
|
5594
|
+
if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
|
5595
|
+
if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
|
5596
|
+
},
|
5597
|
+
addTransientObserver: function(node) {
|
5598
|
+
if (node === this.target) return;
|
5599
|
+
this.addListeners_(node);
|
5600
|
+
this.transientObservedNodes.push(node);
|
5601
|
+
var registrations = registrationsTable.get(node);
|
5602
|
+
if (!registrations) registrationsTable.set(node, registrations = []);
|
5603
|
+
registrations.push(this);
|
5604
|
+
},
|
5605
|
+
removeTransientObservers: function() {
|
5606
|
+
var transientObservedNodes = this.transientObservedNodes;
|
5607
|
+
this.transientObservedNodes = [];
|
5608
|
+
transientObservedNodes.forEach(function(node) {
|
5609
|
+
this.removeListeners_(node);
|
5610
|
+
var registrations = registrationsTable.get(node);
|
5611
|
+
for (var i = 0; i < registrations.length; i++) {
|
5612
|
+
if (registrations[i] === this) {
|
5613
|
+
registrations.splice(i, 1);
|
5614
|
+
break;
|
5615
|
+
}
|
5616
|
+
}
|
5617
|
+
}, this);
|
5618
|
+
},
|
5619
|
+
handleEvent: function(e) {
|
5620
|
+
e.stopImmediatePropagation();
|
5621
|
+
switch (e.type) {
|
5622
|
+
case "DOMAttrModified":
|
5623
|
+
var name = e.attrName;
|
5624
|
+
var namespace = e.relatedNode.namespaceURI;
|
5625
|
+
var target = e.target;
|
5626
|
+
var record = new getRecord("attributes", target);
|
5627
|
+
record.attributeName = name;
|
5628
|
+
record.attributeNamespace = namespace;
|
5629
|
+
var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
|
5630
|
+
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
|
5631
|
+
if (!options.attributes) return;
|
5632
|
+
if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
|
5633
|
+
return;
|
5634
|
+
}
|
5635
|
+
if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
|
5636
|
+
return record;
|
5637
|
+
});
|
5638
|
+
break;
|
5639
|
+
|
5640
|
+
case "DOMCharacterDataModified":
|
5641
|
+
var target = e.target;
|
5642
|
+
var record = getRecord("characterData", target);
|
5643
|
+
var oldValue = e.prevValue;
|
5644
|
+
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
|
5645
|
+
if (!options.characterData) return;
|
5646
|
+
if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
|
5647
|
+
return record;
|
5648
|
+
});
|
5649
|
+
break;
|
5650
|
+
|
5651
|
+
case "DOMNodeRemoved":
|
5652
|
+
this.addTransientObserver(e.target);
|
5653
|
+
|
5654
|
+
case "DOMNodeInserted":
|
5655
|
+
var changedNode = e.target;
|
5656
|
+
var addedNodes, removedNodes;
|
5657
|
+
if (e.type === "DOMNodeInserted") {
|
5658
|
+
addedNodes = [ changedNode ];
|
5659
|
+
removedNodes = [];
|
5660
|
+
} else {
|
5661
|
+
addedNodes = [];
|
5662
|
+
removedNodes = [ changedNode ];
|
5663
|
+
}
|
5664
|
+
var previousSibling = changedNode.previousSibling;
|
5665
|
+
var nextSibling = changedNode.nextSibling;
|
5666
|
+
var record = getRecord("childList", e.target.parentNode);
|
5667
|
+
record.addedNodes = addedNodes;
|
5668
|
+
record.removedNodes = removedNodes;
|
5669
|
+
record.previousSibling = previousSibling;
|
5670
|
+
record.nextSibling = nextSibling;
|
5671
|
+
forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
|
5672
|
+
if (!options.childList) return;
|
5673
|
+
return record;
|
5674
|
+
});
|
5675
|
+
}
|
5676
|
+
clearRecords();
|
5677
|
+
}
|
5678
|
+
};
|
5679
|
+
global.JsMutationObserver = JsMutationObserver;
|
5680
|
+
if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
|
5681
|
+
})(this);
|
5682
|
+
|
4723
5683
|
window.HTMLImports = window.HTMLImports || {
|
4724
5684
|
flags: {}
|
4725
5685
|
};
|
@@ -4771,26 +5731,35 @@ window.HTMLImports = window.HTMLImports || {
|
|
4771
5731
|
}
|
4772
5732
|
function watchImportsLoad(callback, doc) {
|
4773
5733
|
var imports = doc.querySelectorAll("link[rel=import]");
|
4774
|
-
var
|
4775
|
-
function checkDone(
|
4776
|
-
if (
|
4777
|
-
callback(
|
5734
|
+
var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
|
5735
|
+
function checkDone() {
|
5736
|
+
if (parsedCount == importCount && callback) {
|
5737
|
+
callback({
|
5738
|
+
allImports: imports,
|
5739
|
+
loadedImports: newImports,
|
5740
|
+
errorImports: errorImports
|
5741
|
+
});
|
4778
5742
|
}
|
4779
5743
|
}
|
4780
5744
|
function loadedImport(e) {
|
4781
5745
|
markTargetLoaded(e);
|
4782
|
-
|
5746
|
+
newImports.push(this);
|
5747
|
+
parsedCount++;
|
4783
5748
|
checkDone();
|
4784
5749
|
}
|
4785
|
-
|
4786
|
-
|
5750
|
+
function errorLoadingImport(e) {
|
5751
|
+
errorImports.push(this);
|
5752
|
+
parsedCount++;
|
5753
|
+
checkDone();
|
5754
|
+
}
|
5755
|
+
if (importCount) {
|
5756
|
+
for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
|
4787
5757
|
if (isImportLoaded(imp)) {
|
4788
|
-
|
4789
|
-
|
4790
|
-
});
|
5758
|
+
parsedCount++;
|
5759
|
+
checkDone();
|
4791
5760
|
} else {
|
4792
5761
|
imp.addEventListener("load", loadedImport);
|
4793
|
-
imp.addEventListener("error",
|
5762
|
+
imp.addEventListener("error", errorLoadingImport);
|
4794
5763
|
}
|
4795
5764
|
}
|
4796
5765
|
} else {
|
@@ -4840,11 +5809,11 @@ window.HTMLImports = window.HTMLImports || {
|
|
4840
5809
|
}
|
4841
5810
|
})();
|
4842
5811
|
}
|
4843
|
-
whenReady(function() {
|
5812
|
+
whenReady(function(detail) {
|
4844
5813
|
HTMLImports.ready = true;
|
4845
5814
|
HTMLImports.readyTime = new Date().getTime();
|
4846
5815
|
var evt = rootDocument.createEvent("CustomEvent");
|
4847
|
-
evt.initCustomEvent("HTMLImportsLoaded", true, true,
|
5816
|
+
evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
|
4848
5817
|
rootDocument.dispatchEvent(evt);
|
4849
5818
|
});
|
4850
5819
|
scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
|
@@ -4852,7 +5821,7 @@ window.HTMLImports = window.HTMLImports || {
|
|
4852
5821
|
scope.rootDocument = rootDocument;
|
4853
5822
|
scope.whenReady = whenReady;
|
4854
5823
|
scope.isIE = isIE;
|
4855
|
-
})(HTMLImports);
|
5824
|
+
})(window.HTMLImports);
|
4856
5825
|
|
4857
5826
|
(function(scope) {
|
4858
5827
|
var modules = [];
|
@@ -4866,26 +5835,29 @@ window.HTMLImports = window.HTMLImports || {
|
|
4866
5835
|
};
|
4867
5836
|
scope.addModule = addModule;
|
4868
5837
|
scope.initializeModules = initializeModules;
|
4869
|
-
})(HTMLImports);
|
5838
|
+
})(window.HTMLImports);
|
4870
5839
|
|
4871
|
-
HTMLImports.addModule(function(scope) {
|
5840
|
+
window.HTMLImports.addModule(function(scope) {
|
4872
5841
|
var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
|
4873
5842
|
var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
|
4874
5843
|
var path = {
|
4875
|
-
resolveUrlsInStyle: function(style) {
|
5844
|
+
resolveUrlsInStyle: function(style, linkUrl) {
|
4876
5845
|
var doc = style.ownerDocument;
|
4877
5846
|
var resolver = doc.createElement("a");
|
4878
|
-
style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);
|
5847
|
+
style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
|
4879
5848
|
return style;
|
4880
5849
|
},
|
4881
|
-
resolveUrlsInCssText: function(cssText, urlObj) {
|
4882
|
-
var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);
|
4883
|
-
r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);
|
5850
|
+
resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
|
5851
|
+
var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
|
5852
|
+
r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
|
4884
5853
|
return r;
|
4885
5854
|
},
|
4886
|
-
replaceUrls: function(text, urlObj, regexp) {
|
5855
|
+
replaceUrls: function(text, urlObj, linkUrl, regexp) {
|
4887
5856
|
return text.replace(regexp, function(m, pre, url, post) {
|
4888
5857
|
var urlPath = url.replace(/["']/g, "");
|
5858
|
+
if (linkUrl) {
|
5859
|
+
urlPath = new URL(urlPath, linkUrl).href;
|
5860
|
+
}
|
4889
5861
|
urlObj.href = urlPath;
|
4890
5862
|
urlPath = urlObj.href;
|
4891
5863
|
return pre + "'" + urlPath + "'" + post;
|
@@ -4895,7 +5867,7 @@ HTMLImports.addModule(function(scope) {
|
|
4895
5867
|
scope.path = path;
|
4896
5868
|
});
|
4897
5869
|
|
4898
|
-
HTMLImports.addModule(function(scope) {
|
5870
|
+
window.HTMLImports.addModule(function(scope) {
|
4899
5871
|
var xhr = {
|
4900
5872
|
async: true,
|
4901
5873
|
ok: function(request) {
|
@@ -4927,7 +5899,7 @@ HTMLImports.addModule(function(scope) {
|
|
4927
5899
|
scope.xhr = xhr;
|
4928
5900
|
});
|
4929
5901
|
|
4930
|
-
HTMLImports.addModule(function(scope) {
|
5902
|
+
window.HTMLImports.addModule(function(scope) {
|
4931
5903
|
var xhr = scope.xhr;
|
4932
5904
|
var flags = scope.flags;
|
4933
5905
|
var Loader = function(onLoad, onComplete) {
|
@@ -5020,7 +5992,7 @@ HTMLImports.addModule(function(scope) {
|
|
5020
5992
|
scope.Loader = Loader;
|
5021
5993
|
});
|
5022
5994
|
|
5023
|
-
HTMLImports.addModule(function(scope) {
|
5995
|
+
window.HTMLImports.addModule(function(scope) {
|
5024
5996
|
var Observer = function(addCallback) {
|
5025
5997
|
this.addCallback = addCallback;
|
5026
5998
|
this.mo = new MutationObserver(this.handler.bind(this));
|
@@ -5053,7 +6025,7 @@ HTMLImports.addModule(function(scope) {
|
|
5053
6025
|
scope.Observer = Observer;
|
5054
6026
|
});
|
5055
6027
|
|
5056
|
-
HTMLImports.addModule(function(scope) {
|
6028
|
+
window.HTMLImports.addModule(function(scope) {
|
5057
6029
|
var path = scope.path;
|
5058
6030
|
var rootDocument = scope.rootDocument;
|
5059
6031
|
var flags = scope.flags;
|
@@ -5062,7 +6034,7 @@ HTMLImports.addModule(function(scope) {
|
|
5062
6034
|
var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
|
5063
6035
|
var importParser = {
|
5064
6036
|
documentSelectors: IMPORT_SELECTOR,
|
5065
|
-
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","),
|
6037
|
+
importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
|
5066
6038
|
map: {
|
5067
6039
|
link: "parseLink",
|
5068
6040
|
script: "parseScript",
|
@@ -5153,6 +6125,7 @@ HTMLImports.addModule(function(scope) {
|
|
5153
6125
|
parseStyle: function(elt) {
|
5154
6126
|
var src = elt;
|
5155
6127
|
elt = cloneStyle(elt);
|
6128
|
+
src.__appliedElement = elt;
|
5156
6129
|
elt.__importElement = src;
|
5157
6130
|
this.parseGeneric(elt);
|
5158
6131
|
},
|
@@ -5197,9 +6170,11 @@ HTMLImports.addModule(function(scope) {
|
|
5197
6170
|
}
|
5198
6171
|
}
|
5199
6172
|
if (fakeLoad) {
|
5200
|
-
|
5201
|
-
|
5202
|
-
|
6173
|
+
setTimeout(function() {
|
6174
|
+
elt.dispatchEvent(new CustomEvent("load", {
|
6175
|
+
bubbles: false
|
6176
|
+
}));
|
6177
|
+
});
|
5203
6178
|
}
|
5204
6179
|
}
|
5205
6180
|
},
|
@@ -5282,7 +6257,7 @@ HTMLImports.addModule(function(scope) {
|
|
5282
6257
|
scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
|
5283
6258
|
});
|
5284
6259
|
|
5285
|
-
HTMLImports.addModule(function(scope) {
|
6260
|
+
window.HTMLImports.addModule(function(scope) {
|
5286
6261
|
var flags = scope.flags;
|
5287
6262
|
var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
|
5288
6263
|
var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
|
@@ -5381,7 +6356,7 @@ HTMLImports.addModule(function(scope) {
|
|
5381
6356
|
scope.importLoader = importLoader;
|
5382
6357
|
});
|
5383
6358
|
|
5384
|
-
HTMLImports.addModule(function(scope) {
|
6359
|
+
window.HTMLImports.addModule(function(scope) {
|
5385
6360
|
var parser = scope.parser;
|
5386
6361
|
var importer = scope.importer;
|
5387
6362
|
var dynamic = {
|
@@ -5437,7 +6412,7 @@ HTMLImports.addModule(function(scope) {
|
|
5437
6412
|
} else {
|
5438
6413
|
document.addEventListener("DOMContentLoaded", bootstrap);
|
5439
6414
|
}
|
5440
|
-
})(HTMLImports);
|
6415
|
+
})(window.HTMLImports);
|
5441
6416
|
|
5442
6417
|
window.CustomElements = window.CustomElements || {
|
5443
6418
|
flags: {}
|
@@ -5458,9 +6433,9 @@ window.CustomElements = window.CustomElements || {
|
|
5458
6433
|
scope.initializeModules = initializeModules;
|
5459
6434
|
scope.hasNative = Boolean(document.registerElement);
|
5460
6435
|
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
|
5461
|
-
})(CustomElements);
|
6436
|
+
})(window.CustomElements);
|
5462
6437
|
|
5463
|
-
CustomElements.addModule(function(scope) {
|
6438
|
+
window.CustomElements.addModule(function(scope) {
|
5464
6439
|
var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
|
5465
6440
|
function forSubtree(node, cb) {
|
5466
6441
|
findAllElements(node, function(e) {
|
@@ -5494,13 +6469,10 @@ CustomElements.addModule(function(scope) {
|
|
5494
6469
|
root = root.olderShadowRoot;
|
5495
6470
|
}
|
5496
6471
|
}
|
5497
|
-
var processingDocuments;
|
5498
6472
|
function forDocumentTree(doc, cb) {
|
5499
|
-
|
5500
|
-
_forDocumentTree(doc, cb);
|
5501
|
-
processingDocuments = null;
|
6473
|
+
_forDocumentTree(doc, cb, []);
|
5502
6474
|
}
|
5503
|
-
function _forDocumentTree(doc, cb) {
|
6475
|
+
function _forDocumentTree(doc, cb, processingDocuments) {
|
5504
6476
|
doc = wrap(doc);
|
5505
6477
|
if (processingDocuments.indexOf(doc) >= 0) {
|
5506
6478
|
return;
|
@@ -5509,7 +6481,7 @@ CustomElements.addModule(function(scope) {
|
|
5509
6481
|
var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
|
5510
6482
|
for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
|
5511
6483
|
if (n.import) {
|
5512
|
-
_forDocumentTree(n.import, cb);
|
6484
|
+
_forDocumentTree(n.import, cb, processingDocuments);
|
5513
6485
|
}
|
5514
6486
|
}
|
5515
6487
|
cb(doc);
|
@@ -5518,7 +6490,7 @@ CustomElements.addModule(function(scope) {
|
|
5518
6490
|
scope.forSubtree = forSubtree;
|
5519
6491
|
});
|
5520
6492
|
|
5521
|
-
CustomElements.addModule(function(scope) {
|
6493
|
+
window.CustomElements.addModule(function(scope) {
|
5522
6494
|
var flags = scope.flags;
|
5523
6495
|
var forSubtree = scope.forSubtree;
|
5524
6496
|
var forDocumentTree = scope.forDocumentTree;
|
@@ -5616,7 +6588,7 @@ CustomElements.addModule(function(scope) {
|
|
5616
6588
|
if (p == doc) {
|
5617
6589
|
return true;
|
5618
6590
|
}
|
5619
|
-
p = p.parentNode || p.host;
|
6591
|
+
p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
|
5620
6592
|
}
|
5621
6593
|
}
|
5622
6594
|
function watchShadow(node) {
|
@@ -5714,7 +6686,7 @@ CustomElements.addModule(function(scope) {
|
|
5714
6686
|
scope.takeRecords = takeRecords;
|
5715
6687
|
});
|
5716
6688
|
|
5717
|
-
CustomElements.addModule(function(scope) {
|
6689
|
+
window.CustomElements.addModule(function(scope) {
|
5718
6690
|
var flags = scope.flags;
|
5719
6691
|
function upgrade(node) {
|
5720
6692
|
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
|
@@ -5774,9 +6746,10 @@ CustomElements.addModule(function(scope) {
|
|
5774
6746
|
scope.implementPrototype = implementPrototype;
|
5775
6747
|
});
|
5776
6748
|
|
5777
|
-
CustomElements.addModule(function(scope) {
|
6749
|
+
window.CustomElements.addModule(function(scope) {
|
6750
|
+
var isIE11OrOlder = scope.isIE11OrOlder;
|
5778
6751
|
var upgradeDocumentTree = scope.upgradeDocumentTree;
|
5779
|
-
var
|
6752
|
+
var upgradeAll = scope.upgradeAll;
|
5780
6753
|
var upgradeWithDefinition = scope.upgradeWithDefinition;
|
5781
6754
|
var implementPrototype = scope.implementPrototype;
|
5782
6755
|
var useNative = scope.useNative;
|
@@ -5905,6 +6878,12 @@ CustomElements.addModule(function(scope) {
|
|
5905
6878
|
}
|
5906
6879
|
}
|
5907
6880
|
function createElement(tag, typeExtension) {
|
6881
|
+
if (tag) {
|
6882
|
+
tag = tag.toLowerCase();
|
6883
|
+
}
|
6884
|
+
if (typeExtension) {
|
6885
|
+
typeExtension = typeExtension.toLowerCase();
|
6886
|
+
}
|
5908
6887
|
var definition = getRegisteredDefinition(typeExtension || tag);
|
5909
6888
|
if (definition) {
|
5910
6889
|
if (tag == definition.tag && typeExtension == definition.is) {
|
@@ -5926,14 +6905,8 @@ CustomElements.addModule(function(scope) {
|
|
5926
6905
|
}
|
5927
6906
|
return element;
|
5928
6907
|
}
|
5929
|
-
function cloneNode(deep) {
|
5930
|
-
var n = domCloneNode.call(this, deep);
|
5931
|
-
upgrade(n);
|
5932
|
-
return n;
|
5933
|
-
}
|
5934
6908
|
var domCreateElement = document.createElement.bind(document);
|
5935
6909
|
var domCreateElementNS = document.createElementNS.bind(document);
|
5936
|
-
var domCloneNode = Node.prototype.cloneNode;
|
5937
6910
|
var isInstance;
|
5938
6911
|
if (!Object.__proto__ && !useNative) {
|
5939
6912
|
isInstance = function(obj, ctor) {
|
@@ -5951,10 +6924,34 @@ CustomElements.addModule(function(scope) {
|
|
5951
6924
|
return obj instanceof base;
|
5952
6925
|
};
|
5953
6926
|
}
|
6927
|
+
function wrapDomMethodToForceUpgrade(obj, methodName) {
|
6928
|
+
var orig = obj[methodName];
|
6929
|
+
obj[methodName] = function() {
|
6930
|
+
var n = orig.apply(this, arguments);
|
6931
|
+
upgradeAll(n);
|
6932
|
+
return n;
|
6933
|
+
};
|
6934
|
+
}
|
6935
|
+
wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
|
6936
|
+
wrapDomMethodToForceUpgrade(document, "importNode");
|
6937
|
+
if (isIE11OrOlder) {
|
6938
|
+
(function() {
|
6939
|
+
var importNode = document.importNode;
|
6940
|
+
document.importNode = function() {
|
6941
|
+
var n = importNode.apply(document, arguments);
|
6942
|
+
if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
|
6943
|
+
var f = document.createDocumentFragment();
|
6944
|
+
f.appendChild(n);
|
6945
|
+
return f;
|
6946
|
+
} else {
|
6947
|
+
return n;
|
6948
|
+
}
|
6949
|
+
};
|
6950
|
+
})();
|
6951
|
+
}
|
5954
6952
|
document.registerElement = register;
|
5955
6953
|
document.createElement = createElement;
|
5956
6954
|
document.createElementNS = createElementNS;
|
5957
|
-
Node.prototype.cloneNode = cloneNode;
|
5958
6955
|
scope.registry = registry;
|
5959
6956
|
scope.instanceof = isInstance;
|
5960
6957
|
scope.reservedTagList = reservedTagList;
|
@@ -6026,6 +7023,7 @@ CustomElements.addModule(function(scope) {
|
|
6026
7023
|
var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
|
6027
7024
|
window.addEventListener(loadEvent, bootstrap);
|
6028
7025
|
}
|
7026
|
+
scope.isIE11OrOlder = isIE11OrOlder;
|
6029
7027
|
})(window.CustomElements);
|
6030
7028
|
|
6031
7029
|
(function(scope) {
|