├── packages ├── url │ ├── testharnessreport.js │ ├── package-lock.json │ ├── README.md │ ├── bower.json │ ├── CHANGELOG.md │ ├── package.json │ └── gulpfile.js ├── tests │ ├── formdata-event │ │ ├── blank.html │ │ ├── wrappers │ │ │ └── index.html │ │ ├── test_environment.html │ │ └── index.html │ ├── html-imports │ │ └── html │ │ │ ├── imports │ │ │ ├── load-empty.html │ │ │ ├── load-empty-async.html │ │ │ ├── es-module-import-2.html │ │ │ ├── es-module-1.js │ │ │ ├── es-module-3.js │ │ │ ├── es-module-2.js │ │ │ ├── es-module-inline.html │ │ │ ├── google.png │ │ │ ├── es-module-import-1.html │ │ │ ├── empty-script.html │ │ │ ├── empty-style.html │ │ │ ├── abs.html │ │ │ ├── sheet2.css │ │ │ ├── csp-import-2.html │ │ │ ├── import-1-1.html │ │ │ ├── import-1-3.html │ │ │ ├── sheet3.css │ │ │ ├── sheet4.css │ │ │ ├── csp-script-1.js │ │ │ ├── csp-script-2.js │ │ │ ├── base-1.html │ │ │ ├── resolve-import-c.html │ │ │ ├── unclosed-import.html │ │ │ ├── base │ │ │ │ └── base-2.html │ │ │ ├── load-2.html │ │ │ ├── dedupe.html │ │ │ ├── csp-import-1.html │ │ │ ├── sheet1.css │ │ │ ├── external-script.js │ │ │ ├── load-a.html │ │ │ ├── load-d.html │ │ │ ├── svg-style.html │ │ │ ├── encoding-import.html │ │ │ ├── import-1.html │ │ │ ├── load-b.html │ │ │ ├── load-c.html │ │ │ ├── ready-state-check-import.html │ │ │ ├── import-1-2.html │ │ │ ├── parsed-import-1.html │ │ │ ├── resolve-import-b.html │ │ │ ├── styles.css │ │ │ ├── current-script.js │ │ │ ├── dynamic-importer.html │ │ │ ├── parsed-import-2.html │ │ │ ├── script-2.html │ │ │ ├── load-1.html │ │ │ ├── script-1.html │ │ │ ├── style-elements-import.html │ │ │ ├── style-links-import.html │ │ │ ├── style-paths-import.html │ │ │ ├── template-import.html │ │ │ └── dynamic-elements-import.html │ │ │ ├── resolve-import-c.html │ │ │ ├── resolve-import-a.html │ │ │ ├── csp.js │ │ │ ├── csp.html │ │ │ ├── link-import.html │ │ │ ├── load-loop.html │ │ │ ├── load-svg-style.html │ │ │ ├── dynamic-importer.html │ │ │ ├── encoding.html │ │ │ └── unclosed.html │ ├── custom-elements │ │ ├── html │ │ │ ├── sub-import.html │ │ │ ├── imported-doc.html │ │ │ ├── incorrectly-imported-doc.html │ │ │ └── async-import.html │ │ ├── catchReportedErrors.js │ │ └── safari-gc-bug-workaround.js │ ├── core-js_url.js │ ├── webcomponentsjs_ │ │ ├── parent-node │ │ │ └── index.html │ │ ├── child-node │ │ │ └── index.html │ │ ├── modules │ │ │ ├── module-b.js │ │ │ ├── module-a-sub.js │ │ │ ├── module-a.js │ │ │ └── common-subclass.js │ │ ├── wct-config.js │ │ ├── imports │ │ │ ├── import-upgrade-order.html │ │ │ ├── a1-instance.html │ │ │ ├── csp-import-2.html │ │ │ ├── csp-script-1.js │ │ │ ├── csp-script-2.js │ │ │ ├── element-import-a.html │ │ │ ├── element-import-b.html │ │ │ ├── import-file.html │ │ │ ├── a1-import.html │ │ │ ├── csp-import-1.html │ │ │ ├── current-script.js │ │ │ ├── element-import.html │ │ │ ├── script-2.html │ │ │ ├── simple-element-2.js │ │ │ ├── script-1.html │ │ │ ├── a1-reference.html │ │ │ ├── a1-define.html │ │ │ └── simple-element.js │ │ ├── trusted-types │ │ │ ├── index.html │ │ │ ├── loader-only-test-page_src-replace_none-allowed.html │ │ │ └── loader-only-test-page_src-replace_loader-allowed.html │ │ ├── matches.html │ │ └── baseuri.html │ ├── chai.js │ ├── shadydom │ │ ├── wct-browser-config.js │ │ └── smoke │ │ │ └── rel.html │ ├── .eslintrc.json │ ├── rollup.config.js │ ├── shadycss │ │ ├── html-imports │ │ │ └── custom-style-import.html │ │ ├── module │ │ │ ├── style-placeholder.js │ │ │ ├── style-info.js │ │ │ ├── css-parse.js │ │ │ ├── style-cache.js │ │ │ ├── style-util.js │ │ │ ├── style-settings.js │ │ │ ├── style-properties.js │ │ │ ├── style-transformer.js │ │ │ ├── custom-style-element.js │ │ │ └── make-element.js │ │ ├── async-loading.html │ │ └── gulpfile.js │ ├── template │ │ └── runner.html │ ├── shady-css-scoped-element │ │ └── index.html │ ├── environment.js │ └── package.json ├── scoped-custom-element-registry │ ├── .gitignore │ ├── test │ │ ├── ShadowRoot.test.html │ │ ├── global-registry.test.html │ │ ├── scoped-registry.test.html │ │ ├── native-htmlelement.test.js │ │ └── Element.test.html │ ├── web-test-runner.config.js │ ├── closure-flags.txt │ └── tsconfig.json ├── webcomponentsjs │ ├── .gitattributes │ ├── ts_src │ │ ├── platform │ │ │ ├── custom_typings.d.ts │ │ │ ├── parent-node │ │ │ │ ├── index.ts │ │ │ │ └── append.ts │ │ │ ├── child-node │ │ │ │ └── index.ts │ │ │ ├── matches.ts │ │ │ ├── baseuri.ts │ │ │ └── es6-misc.ts │ │ └── unresolved.ts │ ├── license-header.txt │ ├── closure-output.txt │ ├── src │ │ └── entrypoints │ │ │ ├── webcomponents-pf_js-index.js │ │ │ ├── custom-elements-es5-adapter-index.js │ │ │ ├── webcomponents-ce-index.js │ │ │ ├── webcomponents-sd-index.js │ │ │ ├── webcomponents-sd-ce-index.js │ │ │ ├── webcomponents-pf_dom-index.js │ │ │ └── webcomponents-sd-ce-pf-index.js │ ├── tsconfig.json │ └── externs │ │ ├── webcomponents.js │ │ └── webcomponents.d.ts ├── shadydom │ ├── package-lock.json │ ├── rollup.config.js │ ├── src │ │ ├── patches │ │ │ ├── EventTarget.js │ │ │ ├── DocumentOrFragment.js │ │ │ ├── Slotable.js │ │ │ ├── Window.js │ │ │ └── HTMLElement.js │ │ ├── shady-data.js │ │ └── flush.js │ └── package.json ├── template │ ├── package-lock.json │ ├── CHANGELOG.md │ ├── README.md │ ├── externs │ │ └── template.d.ts │ ├── package.json │ └── gulpfile.js ├── formdata-event │ ├── package-lock.json │ ├── ts_src │ │ ├── environment │ │ │ ├── globals.ts │ │ │ ├── html_collection.ts │ │ │ ├── document.ts │ │ │ ├── form_data.ts │ │ │ ├── window.ts │ │ │ ├── event_target.ts │ │ │ ├── html_form_element.ts │ │ │ ├── element.ts │ │ │ ├── html_input_element.ts │ │ │ ├── node.ts │ │ │ └── event.ts │ │ ├── environment_api │ │ │ ├── html_form_element.ts │ │ │ ├── document.ts │ │ │ ├── html_collection.ts │ │ │ └── element.ts │ │ ├── index.ts │ │ └── wrappers │ │ │ └── html_form_element.ts │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── package.json │ └── gulpfile.js ├── html-imports │ ├── package-lock.json │ ├── package.json │ ├── gulpfile.js │ └── CHANGELOG.md ├── shady-css-scoped-element │ ├── package-lock.json │ ├── README.md │ ├── package.json │ └── gulpfile.js ├── custom-elements │ ├── rollup.config.js │ ├── ts_src │ │ ├── CustomElementState.ts │ │ ├── AlreadyConstructedMarker.ts │ │ ├── Patch │ │ │ └── DocumentFragment.ts │ │ └── Deferred.ts │ ├── tsconfig.json │ ├── externs │ │ └── custom-elements.d.ts │ └── package.json └── shadycss │ ├── tsconfig.json │ ├── apply-shim.html │ ├── custom-style-interface.html │ ├── src │ ├── template-map.js │ ├── common-regex.js │ └── env.d.ts │ └── examples │ └── custom-style-element.js ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── maintenance.md │ ├── feature.md │ └── bug.md ├── PULL_REQUEST_TEMPLATE.md ├── stale.yml └── workflows │ └── changelog.yml ├── .gitattributes ├── .eslintignore-sync ├── .prettierrc.json ├── .editorconfig ├── .prettierignore-sync ├── lerna.json ├── SECURITY.md ├── wct.conf.json ├── .gitignore ├── .eslintignore ├── .eslintrc.json └── .prettierignore /packages/url/testharnessreport.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/tests/formdata-event/blank.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @aomarks @bicknellr 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.min.* binary 2 | package-lock.json binary -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-empty.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-empty-async.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/tests/custom-elements/html/sub-import.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/.gitignore: -------------------------------------------------------------------------------- 1 | .wireit/ 2 | .tsbuildinfo 3 | build/ 4 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/.gitattributes: -------------------------------------------------------------------------------- 1 | webcomponents-bundle.js* binary 2 | bundles/* binary 3 | -------------------------------------------------------------------------------- /.eslintignore-sync: -------------------------------------------------------------------------------- 1 | [local] 2 | .gitignore 3 | 4 | [relative] 5 | packages/*/{.gitignore,.eslintignore} 6 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": false, 3 | "quoteProps": "preserve", 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /packages/tests/custom-elements/html/imported-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-import-2.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/url/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/url", 3 | "version": "0.7.9", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-1.js: -------------------------------------------------------------------------------- 1 | import './es-module-2.js'; 2 | 3 | window.loadedModules.push('es-module-1'); 4 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-3.js: -------------------------------------------------------------------------------- 1 | import './es-module-1.js'; 2 | 3 | window.loadedModules.push('es-module-3'); 4 | -------------------------------------------------------------------------------- /packages/shadydom/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/shadydom", 3 | "version": "1.11.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/template/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/template", 3 | "version": "1.5.1", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-2.js: -------------------------------------------------------------------------------- 1 | export const message = 'foo'; 2 | 3 | window.loadedModules.push('es-module-2'); 4 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-inline.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/formdata-event/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/formdata-event", 3 | "version": "0.0.3", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/html-imports/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/html-imports", 3 | "version": "1.3.1", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webcomponents/polyfills/HEAD/packages/tests/html-imports/html/imports/google.png -------------------------------------------------------------------------------- /packages/shadydom/rollup.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | input: 'src/shadydom.js', 3 | output: {file: 'shadydom.min.js', format: 'iife', sourcemap: true}, 4 | }; 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | indent_style = space 8 | indent_size = 2 -------------------------------------------------------------------------------- /packages/shady-css-scoped-element/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@webcomponents/shady-css-scoped-element", 3 | "version": "0.0.8", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /packages/tests/custom-elements/html/incorrectly-imported-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/maintenance.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Maintenance 3 | about: Cleanup and other maintenance work 4 | labels: 'Type: Maintenance, Focus Area: Standards & Polyfills' 5 | --- 6 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/es-module-import-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/custom-elements/rollup.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | input: 'src/custom-elements.js', 3 | output: {file: 'custom-elements.min.js', format: 'iife', sourcemap: true}, 4 | }; 5 | -------------------------------------------------------------------------------- /.prettierignore-sync: -------------------------------------------------------------------------------- 1 | [local] 2 | .gitignore 3 | 4 | [relative] 5 | packages/*/{.gitignore,.prettierignore} 6 | 7 | [inline] 8 | LICENSE 9 | packages/*/LICENSE.md 10 | packages/tests/html-imports/html/imports/unclosed-import.html 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/tests/core-js_url.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the entrypoint for the `core-js` bundle used as part of the test 3 | * environment. `core-js` is only distributed as Common JS, so it must be 4 | * bundled. 5 | */ 6 | 7 | import 'core-js/stable/url'; 8 | -------------------------------------------------------------------------------- /packages/url/README.md: -------------------------------------------------------------------------------- 1 | # URL 2 | 3 | URL parser in JavaScript 4 | 5 | This is a fork of [annevk/url](https://github.com/annevk/url). The code has been converted to pragmatic JS with a 6 | huge performance improvement as a side effect. 7 | 8 | # License 9 | 10 | This is public domain. 11 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/parent-node/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/child-node/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /packages/tests/custom-elements/html/async-import.html: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "3.13.3", 3 | "packages": ["packages/*"], 4 | "version": "independent", 5 | "command": { 6 | "publish": { 7 | "allowBranch": ["master"], 8 | "ignoreChanges": [ 9 | ".gitignore", 10 | ".travis.yml", 11 | "README.md", 12 | "appveyor.yml" 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/ts_src/platform/custom_typings.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'promise-polyfill/src/index.js' { 2 | type PromiseConstructor = typeof Promise; 3 | interface PromisePolyfill extends PromiseConstructor { 4 | _immediateFn(callback: () => void): void; 5 | } 6 | const PromisePolyfill: PromisePolyfill; 7 | export default PromisePolyfill; 8 | } 9 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/test/ShadowRoot.test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/test/global-registry.test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/test/scoped-registry.test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/url/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "url", 3 | "main": "url.js", 4 | "homepage": "https://github.com/Polymer/URL", 5 | "authors": ["https://github.com/Polymer/URL/graphs/contributors"], 6 | "description": "URL parser in JavaScript", 7 | "keywords": ["url", "urlsearchparams", "whatwg", "w3c"], 8 | "license": "https://github.com/Polymer/URL#license", 9 | "ignore": ["*test*", "playground.html"] 10 | } 11 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | To report a suspected vulnerability please report it through GitHub at https://github.com/webcomponents/polyfills/security/advisories/new 6 | 7 | Please do not report any suspected vulnerabilities through public issues. 8 | 9 | ## Supported versions 10 | 11 | Only the latest major version of each polyfill is supported with security updates. 12 | -------------------------------------------------------------------------------- /packages/tests/chai.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the entrypoint for the Chai bundle used as part of the test 3 | * environment. Chai is only distributed as Common JS, so it must be bundled. 4 | * 5 | * Despite the `.mjs` extension, the module referenced here[^1] imports another 6 | * file[^2] that itself attempts to import the entire library using `require()`. 7 | * 8 | * [^1]: https://github.com/chaijs/chai/blob/v4.3.6/index.mjs 9 | * [^2]: https://github.com/chaijs/chai/blob/v4.3.6/index.js 10 | */ 11 | 12 | export * from 'chai/index.mjs'; 13 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Mark issues stale after 1 year 2 | daysUntilStale: 365 3 | # Delete stale issues after 2 years 4 | daysUntilClose: 730 5 | markComment: > 6 | This issue has been automatically marked as stale because it has not had 7 | recent activity. It will be closed if no further activity occurs. Thank you 8 | for your contributions. 9 | closeComment: > 10 | This issue has been automatically closed after being marked stale. If you're 11 | still facing this problem with the above solution, please comment and we'll 12 | reopen! 13 | -------------------------------------------------------------------------------- /packages/tests/shadydom/wct-browser-config.js: -------------------------------------------------------------------------------- 1 | window.WCT = { 2 | // Force the 'root' path to be automatically detected relative to the 3 | // 'wct-browser-legacy/browser.js' script. 4 | root: null, 5 | environmentScripts: [ 6 | 'stacky/lib/parsing.js', 7 | 'stacky/lib/formatting.js', 8 | 'stacky/lib/normalization.js', 9 | 'mocha/mocha.js', 10 | 'chai/chai.js', 11 | '@polymer/sinonjs/sinon.js', 12 | 'accessibility-developer-tools/dist/js/axs_testing.js', 13 | '@polymer/test-fixture/test-fixture.js', 14 | ], 15 | }; 16 | -------------------------------------------------------------------------------- /wct.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "suites": [ 3 | "packages/tests/formdata-event/index.html", 4 | "packages/tests/html-imports/index.html", 5 | "packages/tests/shadycss/runner.html", 6 | "packages/tests/shadydom/runner.html", 7 | "packages/tests/template/runner.html", 8 | "packages/tests/webcomponentsjs_/runner.html" 9 | ], 10 | "npm": true, 11 | "plugins": { 12 | "local": { 13 | "browserOptions": { 14 | "chrome": ["headless", "disable-gpu", "no-sandbox"], 15 | "firefox": ["-headless"] 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/license-header.txt: -------------------------------------------------------------------------------- 1 | /** 2 | @license @nocompile 3 | Copyright (c) 2018 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/modules/module-b.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2018 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | -------------------------------------------------------------------------------- /packages/shadycss/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "es2015", 5 | "moduleResolution": "node", 6 | "lib": ["DOM"], 7 | "strict": true, 8 | "declaration": true, 9 | "noUnusedLocals": true, 10 | "noUnusedParameters": true, 11 | "preserveConstEnums": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "rootDir": "ts_src/", 14 | "outDir": "src/", 15 | "sourceMap": true, 16 | "incremental": true, 17 | "tsBuildInfoFile": ".tsbuildinfo" 18 | }, 19 | "include": ["ts_src/**/*"], 20 | "exclude": [] 21 | } 22 | -------------------------------------------------------------------------------- /packages/tests/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "rules": { 6 | "@typescript-eslint/no-unused-vars": "off" 7 | }, 8 | "globals": { 9 | "assert": false, 10 | "chai": false, 11 | "defineTestElement": false, 12 | "expect": false, 13 | "HTMLImports": true, 14 | "loaded": true, 15 | "makeElement": false, 16 | "makeFocusable": false, 17 | "NATIVE": false, 18 | "remoteCurrentScriptExecuted": true, 19 | "ShadyCSS": true, 20 | "ShadyDOM": true, 21 | "sinon": false, 22 | "WCT": true, 23 | "WebComponents": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/wct-config.js: -------------------------------------------------------------------------------- 1 | window.WCT = { 2 | // Force the 'root' path to be automatically detected relative to the 3 | // 'wct-browser-legacy/browser.js' script. 4 | root: null, 5 | environmentScripts: [ 6 | 'stacky/lib/parsing.js', 7 | 'stacky/lib/formatting.js', 8 | 'stacky/lib/normalization.js', 9 | 'mocha/mocha.js', 10 | 'chai/chai.js', 11 | '@polymer/sinonjs/sinon.js', 12 | // 'accessibility-developer-tools/dist/js/axs_testing.js', 13 | // '@polymer/test-fixture/test-fixture.js' 14 | ], 15 | environmentImports: [], 16 | // verbose: true 17 | }; 18 | -------------------------------------------------------------------------------- /packages/shadycss/apply-shim.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/closure-output.txt: -------------------------------------------------------------------------------- 1 | /** 2 | @license @nocompile 3 | Copyright (c) 2018 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | (function(){%output%}).call(this); -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/import-upgrade-order.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/shadycss/custom-style-interface.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/empty-script.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/empty-style.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/abs.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/a1-instance.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/web-test-runner.config.js: -------------------------------------------------------------------------------- 1 | const {playwrightLauncher} = require('@web/test-runner-playwright'); 2 | 3 | const defaultBrowsers = [ 4 | playwrightLauncher({product: 'chromium'}), 5 | playwrightLauncher({product: 'firefox', concurrency: 1}), 6 | playwrightLauncher({product: 'webkit'}), 7 | ]; 8 | 9 | const envBrowsers = process.env.BROWSERS?.split(',').map((product) => 10 | playwrightLauncher({product}) 11 | ); 12 | 13 | const browsers = envBrowsers ?? defaultBrowsers; 14 | 15 | module.exports = { 16 | files: ['test/**/*.test.(js|html)'], 17 | nodeResolve: true, 18 | concurrency: 10, 19 | browsers, 20 | }; 21 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/sheet2.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | .blue { 12 | background-color: blue; 13 | } 14 | -------------------------------------------------------------------------------- /packages/formdata-event/ts_src/environment/globals.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This 4 | * code may only be used under the BSD style license found at 5 | * http://polymer.github.io/LICENSE.txt The complete set of authors may be 6 | * found at http://polymer.github.io/AUTHORS.txt The complete set of 7 | * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code 8 | * distributed by Google as part of the polymer project is also subject to an 9 | * additional IP rights grant found at http://polymer.github.io/PATENTS.txt 10 | */ 11 | 12 | export const document = window.document; 13 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/csp-import-2.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/import-1-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/import-1-3.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/sheet3.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | .orange { 12 | background-color: orange; 13 | } 14 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/sheet4.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | .link-typed { 12 | background-color: navy; 13 | } 14 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/csp-import-2.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/csp-script-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | window.externalScriptParsed1 = new Date().getTime(); 12 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/csp-script-2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | window.externalScriptParsed2 = new Date().getTime(); 12 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/csp-script-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | window.externalScriptParsed1 = new Date().getTime(); 12 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/csp-script-2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | window.externalScriptParsed2 = new Date().getTime(); 12 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/element-import-a.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/element-import-b.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/import-file.html: -------------------------------------------------------------------------------- 1 | 10 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature 3 | about: Request a new polyfill feature 4 | labels: 'Type: Feature, Focus Area: Standards & Polyfills' 5 | --- 6 | 7 | ## Description 8 | 9 | 15 | 16 | ## Motivation 17 | 18 | 25 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/base-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/resolve-import-c.html: -------------------------------------------------------------------------------- 1 | 10 | 13 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/unclosed-import.html: -------------------------------------------------------------------------------- 1 | 10 |
11 | purposefully unclosed tag 12 |
13 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/base/base-2.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/a1-import.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/ts_src/platform/parent-node/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2020 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | import './append.js'; 12 | import './prepend.js'; 13 | import './replace-children.js'; 14 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-2.html: -------------------------------------------------------------------------------- 1 | 10 | 15 | -------------------------------------------------------------------------------- /packages/tests/rollup.config.js: -------------------------------------------------------------------------------- 1 | import commonjs from '@rollup/plugin-commonjs'; 2 | import {nodeResolve} from '@rollup/plugin-node-resolve'; 3 | 4 | export default [ 5 | { 6 | input: 'chai.js', 7 | output: { 8 | file: 'chai-bundle.js', 9 | format: 'es', 10 | }, 11 | plugins: [ 12 | commonjs(), 13 | nodeResolve({ 14 | preferBuiltins: false, 15 | }), 16 | ], 17 | }, 18 | { 19 | input: 'core-js_url.js', 20 | output: { 21 | file: 'core-js_url-bundle.js', 22 | format: 'es', 23 | }, 24 | plugins: [ 25 | commonjs(), 26 | nodeResolve({ 27 | preferBuiltins: false, 28 | }), 29 | ], 30 | }, 31 | ]; 32 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/dedupe.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/ts_src/platform/child-node/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2020 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | import './after.js'; 12 | import './before.js'; 13 | import './remove.js'; 14 | import './replace-with.js'; 15 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/csp-import-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/shadydom/smoke/rel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/csp-import-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/sheet1.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | .red { 12 | background-color: red; 13 | } 14 | 15 | .overridden { 16 | background-color: green; 17 | } 18 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/resolve-import-c.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/src/entrypoints/webcomponents-pf_js-index.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2020 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | import '../platform/es6-misc.js'; 12 | import '../platform/promise.js'; 13 | import '../platform/symbol.js'; 14 | -------------------------------------------------------------------------------- /packages/tests/shadycss/html-imports/custom-style-import.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /packages/shadycss/src/template-map.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2017 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | 'use strict'; 12 | 13 | /** 14 | * @const {!Object} 15 | */ 16 | const templateMap = {}; 17 | export default templateMap; 18 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/resolve-import-a.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/test/native-htmlelement.test.js: -------------------------------------------------------------------------------- 1 | import {expect} from '@open-wc/testing'; 2 | 3 | import {getTestElement} from './utils'; 4 | 5 | describe('Native HTMLElement', () => { 6 | describe('custom element constructors', () => { 7 | it('should allow to create a custom element which class has been created before applying the polyfill', async () => { 8 | const {tagName, CustomElementClass} = getTestElement(); 9 | 10 | await import('../scoped-custom-element-registry.min.js'); 11 | 12 | customElements.define(tagName, CustomElementClass); 13 | 14 | const element = document.createElement(tagName); 15 | 16 | expect(element).to.not.be.undefined; 17 | }); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-placeholder.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import '../../node_modules/@webcomponents/shadycss/src/style-placeholder'; 16 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/external-script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | window.externalScriptParsed = new Date().getTime(); 12 | console.log('externalScriptParsed', window.externalScriptParsed); 13 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-a.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-d.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /packages/shady-css-scoped-element/README.md: -------------------------------------------------------------------------------- 1 | # ShadyCSS Scoped Element 2 | 3 | The `` element provides support for document level styles to declare css variables for use in custom elements in older browsers (IE11). 4 | 5 | # Requirements 6 | 7 | custom-style-interface from @webcomponents/shadycss, support for custom elements via @webcomponents/custom-elements 8 | 9 | # Usage 10 | 11 | When you need to declare css variables outside of a custom element's styles, in index.html for example: 12 | 13 | ```html 14 | 15 | 21 | 22 | 23 | ``` 24 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/svg-style.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/encoding-import.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/import-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/trusted-types/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-info.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import StyleInfo from '../../node_modules/@webcomponents/shadycss/src/style-info'; 16 | window['StyleInfo'] = StyleInfo; 17 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/css-parse.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import * as CssParse from '../../node_modules/@webcomponents/shadycss/src/css-parse'; 16 | 17 | window['CssParse'] = CssParse; 18 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-cache.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import StyleCache from '../../node_modules/@webcomponents/shadycss/src/style-cache'; 16 | window['StyleCache'] = StyleCache; 17 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-util.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import * as StyleUtil from '../../node_modules/@webcomponents/shadycss/src/style-util'; 16 | window['StyleUtil'] = StyleUtil; 17 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/src/entrypoints/custom-elements-es5-adapter-index.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2017 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 'use strict'; 11 | 12 | /* 13 | * Polyfills loaded: Custom Elements ES5 Shim 14 | */ 15 | 16 | import '../../node_modules/@webcomponents/custom-elements/src/native-shim.js'; 17 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-b.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/load-c.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/ready-state-check-import.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/src/entrypoints/webcomponents-ce-index.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2017 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 'use strict'; 11 | 12 | /* 13 | * Polyfills loaded: Custom Elements 14 | * Used in: Safari 10 15 | */ 16 | 17 | import '../../node_modules/@webcomponents/custom-elements/src/custom-elements.js'; 18 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-settings.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import * as StyleSettings from '../../node_modules/@webcomponents/shadycss/src/style-settings'; 16 | window['StyleSettings'] = StyleSettings; 17 | -------------------------------------------------------------------------------- /packages/formdata-event/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "incremental": true, 4 | "target": "es2019", 5 | "tsBuildInfoFile": "./buildcache", 6 | "module": "esnext", 7 | "declaration": true, 8 | "sourceMap": true, 9 | "outDir": "./src", 10 | "importHelpers": true, 11 | "strict": true, 12 | "noImplicitAny": true, 13 | "strictNullChecks": true, 14 | "strictFunctionTypes": true, 15 | "strictBindCallApply": true, 16 | "strictPropertyInitialization": true, 17 | "noImplicitThis": true, 18 | "alwaysStrict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "moduleResolution": "node" 24 | }, 25 | "include": ["ts_src/"] 26 | } 27 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-properties.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import StyleProperties from '../../node_modules/@webcomponents/shadycss/src/style-properties'; 16 | window['StyleProperties'] = StyleProperties; 17 | -------------------------------------------------------------------------------- /packages/tests/webcomponentsjs_/imports/current-script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | /* exported remoteCurrentScriptExecuted */ 11 | remoteCurrentScriptExecuted = window.remoteCurrentScriptExecuted || 0; 12 | remoteCurrentScriptExecuted++; 13 | assert.ok(document._currentScript); 14 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "incremental": true, 4 | "target": "es2019", 5 | "tsBuildInfoFile": "./buildcache", 6 | "module": "esnext", 7 | "declaration": true, 8 | "sourceMap": true, 9 | "outDir": "./src", 10 | "importHelpers": true, 11 | "strict": true, 12 | "noImplicitAny": true, 13 | "strictNullChecks": true, 14 | "strictFunctionTypes": true, 15 | "strictBindCallApply": true, 16 | "strictPropertyInitialization": true, 17 | "noImplicitThis": true, 18 | "alwaysStrict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true, 23 | "moduleResolution": "node" 24 | }, 25 | "include": ["ts_src"] 26 | } 27 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/import-1-2.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/tests/shadycss/module/style-transformer.js: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2016 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | A simple shim to generate a testable module 13 | */ 14 | 15 | import StyleTransformer from '../../node_modules/@webcomponents/shadycss/src/style-transformer'; 16 | window['StyleTransformer'] = StyleTransformer; 17 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/parsed-import-1.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | 17 | -------------------------------------------------------------------------------- /packages/url/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | 9 | 10 | ## [0.7.9] - 2023-03-30 11 | 12 | - Update dependencies ([#542](https://github.com/webcomponents/polyfills/pull/542)) 13 | 14 | ## [0.7.8] - 2021-08-02 15 | 16 | - Maintenance release (no user-facing changes) 17 | 18 | ## [0.7.7] - 2020-10-21 19 | 20 | - Maintenance release (no user-facing changes) 21 | 22 | ## [0.7.6] - 2020-07-20 23 | 24 | - Maintenance release (no user-facing changes) 25 | 26 | ## [0.7.5] - 2020-03-16 27 | 28 | - Maintenance release (no user-facing changes) 29 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/csp.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | test('imported scripts loaded under CSP', function () { 12 | chai.assert.ok(window.externalScriptParsed1, 'externalScriptParsed1'); 13 | chai.assert.ok(window.externalScriptParsed2, 'externalScriptParsed2'); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/resolve-import-b.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/styles.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | /* 12 | Document : styles 13 | Created on : Apr 9, 2013, 5:55:32 PM 14 | Author : sjmiles 15 | Description: 16 | Purpose of the stylesheet follows. 17 | */ 18 | root { 19 | display: block; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /packages/webcomponentsjs/externs/webcomponents.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @externs 3 | * @fileoverview Symbols needed to compile webcomponents 4 | * @license 5 | * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. 6 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 7 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 8 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 9 | * Code distributed by Google as part of the polymer project is also 10 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 11 | */ 12 | var ShadyDOM; 13 | var WebComponents; 14 | 15 | /** @type {!Function} */ 16 | Promise.cast; 17 | 18 | /** @type {function()} */ 19 | HTMLTemplateElement.bootstrap; 20 | -------------------------------------------------------------------------------- /packages/scoped-custom-element-registry/closure-flags.txt: -------------------------------------------------------------------------------- 1 | --compilation_level=ADVANCED_OPTIMIZATIONS 2 | --warning_level=VERBOSE 3 | --language_in=STABLE 4 | --language_out=ECMASCRIPT5_STRICT 5 | --dependency_mode=PRUNE 6 | --entry_point=./build/scoped-custom-element-registry.js 7 | --js=./build/scoped-custom-element-registry.js 8 | --js_output_file=./scoped-custom-element-registry.min.js 9 | --output_wrapper="(function(){ 10 | %output% 11 | }).call(typeof globalThis === 'object' ? globalThis : window); 12 | 13 | //# sourceMappingURL=scoped-custom-element-registry.min.js.map" 14 | --assume_function_wrapper=true 15 | --rewrite_polyfills=false 16 | --create_source_map=./scoped-custom-element-registry.min.js.map 17 | --source_map_input="./build/scoped-custom-element-registry.js|./build/scoped-custom-element-registry.js.map" 18 | --source_map_include_content 19 | -------------------------------------------------------------------------------- /packages/template/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | 9 | 10 | ## [1.5.1] - 2023-03-30 11 | 12 | - Update dependencies ([#542](https://github.com/webcomponents/polyfills/pull/542)) 13 | 14 | ## [1.5.0] - 2021-08-02 15 | 16 | - Add TS externs. ([#457](https://github.com/webcomponents/polyfills/pull/457)) 17 | 18 | ## [1.4.4] - 2020-10-21 19 | 20 | - Maintenance release (no user-facing changes) 21 | 22 | ## [1.4.3] - 2020-07-20 23 | 24 | - Maintenance release (no user-facing changes) 25 | 26 | ## [1.4.2] - 2020-03-16 27 | 28 | - Maintenance release (no user-facing changes) 29 | -------------------------------------------------------------------------------- /packages/tests/html-imports/html/imports/current-script.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | 11 | chai.assert.ok(document.currentScript); 12 | remoteCurrentScriptExecuted = window.remoteCurrentScriptExecuted || 0; 13 | remoteCurrentScriptExecuted++; 14 | console.log('remoteCurrentScriptExecuted ' + remoteCurrentScriptExecuted); 15 | -------------------------------------------------------------------------------- /packages/formdata-event/ts_src/environment/html_collection.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This 4 | * code may only be used under the BSD style license found at 5 | * http://polymer.github.io/LICENSE.txt The complete set of authors may be 6 | * found at http://polymer.github.io/AUTHORS.txt The complete set of 7 | * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code 8 | * distributed by Google as part of the polymer project is also subject to an 9 | * additional IP rights grant found at http://polymer.github.io/PATENTS.txt 10 | */ 11 | 12 | export const constructor = window.HTMLCollection; 13 | 14 | export const prototype = constructor.prototype; 15 | 16 | export const descriptors = { 17 | length: Object.getOwnPropertyDescriptor(prototype, 'length'), 18 | }; 19 | -------------------------------------------------------------------------------- /packages/template/README.md: -------------------------------------------------------------------------------- 1 | # template 2 | 3 | A minimal polyfill for `