Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit af0af5c

Browse files
author
Francois-Xavier Gentilhomme
committed
[FIX] add offset on import content example
1 parent 528f62d commit af0af5c

19 files changed

+568
-16469
lines changed

analysis.json

Lines changed: 0 additions & 7980 deletions
Large diffs are not rendered by default.

docs/components/myscript-text-web/analysis.json

Lines changed: 0 additions & 7980 deletions
Large diffs are not rendered by default.

docs/components/myscript-text-web/examples/v4/import_content.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
<body>
4343
<nav>
4444
<span>
45-
<input type="text" id="importContentField" data-type="text/plain" placeholder="e.g. hello world">
45+
<input type="text" id="importContentField" data-type="text/plain"
46+
placeholder="e.g. hello world"/>
4647
<button id="importContent">Import</button>
4748
</span>
4849
</nav>
@@ -57,7 +58,7 @@
5758
const importContent = document.getElementById('importContentField');
5859

5960
document.getElementById('importContent').addEventListener('click', function () {
60-
component.importContent({ x: 0, y: 0 }, importContent.value, importContent.dataset.type);
61+
component.importContent({ x: 50, y: 50 }, importContent.value, importContent.dataset.type);
6162
});
6263
</script>
6364
</body>

docs/components/webcomponentsjs/.bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"devDependencies": {
2222
"web-component-tester": "^v6.0.0"
2323
},
24-
"version": "1.0.10",
25-
"_release": "1.0.10",
24+
"version": "1.0.11",
25+
"_release": "1.0.11",
2626
"_resolution": {
2727
"type": "version",
28-
"tag": "v1.0.10",
29-
"commit": "e0c551a1662cc768a9f3954dfc90ac48c08cac11"
28+
"tag": "v1.0.11",
29+
"commit": "b381fb0ef4da2b0f228f6356a1906721ddec5594"
3030
},
3131
"_source": "https://github.com/Polymer/webcomponentsjs.git",
3232
"_target": "^1.0.1",

docs/components/webcomponentsjs/entrypoints/webcomponents-hi-sd-ce-pf-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1616

1717
import '../node_modules/@webcomponents/webcomponents-platform/webcomponents-platform.js';
1818
import '../node_modules/@webcomponents/template/template.js';
19-
import '../node_modules/es6-promise/lib/es6-promise.auto.js';
19+
import '../src/promise.js';
2020
import '../node_modules/@webcomponents/html-imports/src/html-imports.js';
2121
import '../src/pre-polyfill.js';
2222
import '../node_modules/@webcomponents/shadydom/src/shadydom.js';

docs/components/webcomponentsjs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webcomponents/webcomponentsjs",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"description": "Web Components Polyfills",
55
"main": "webcomponents-lite.js",
66
"directories": {
@@ -27,22 +27,22 @@
2727
},
2828
"homepage": "https://webcomponents.org/polyfills",
2929
"devDependencies": {
30-
"@webcomponents/custom-elements": "^1.0.2",
30+
"@webcomponents/custom-elements": "^1.0.4",
3131
"@webcomponents/html-imports": "^1.0.0",
32-
"@webcomponents/shadycss": "^1.0.3",
32+
"@webcomponents/shadycss": "^1.0.5",
3333
"@webcomponents/shadydom": "^1.0.0",
3434
"@webcomponents/template": "^1.0.0",
3535
"@webcomponents/webcomponents-platform": "^1.0.0",
3636
"babel-preset-minify": "^0.2.0",
3737
"del": "^3.0.0",
3838
"es6-promise": "^4.1.1",
3939
"eslint": "^4.4.1",
40-
"google-closure-compiler": "^20170806.0.0",
40+
"google-closure-compiler": "^20170910.0.0",
4141
"gulp": "^3.8.8",
4242
"gulp-rename": "^1.2.2",
4343
"gulp-sourcemaps": "^2.4.1",
4444
"rollup-plugin-babel": "^2.7.1",
45-
"rollup-stream": "^1.23.1",
45+
"rollup-stream": "=1.23",
4646
"run-sequence": "^2.0.0",
4747
"vinyl-buffer": "^1.0.0",
4848
"vinyl-source-stream": "^1.1.0",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
import ES6Promise from '../node_modules/es6-promise/lib/es6-promise/promise.js';
12+
13+
/*
14+
Assign the ES6 promise polyfill to window ourselves instead of using the "auto" polyfill
15+
to work around https://github.com/webcomponents/webcomponentsjs/issues/837
16+
*/
17+
if (!window.Promise) {
18+
window.Promise = ES6Promise;
19+
// save catch function with a string name to prevent renaming and dead code eliminiation with closure
20+
ES6Promise.prototype['catch'] = ES6Promise.prototype.catch;
21+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!doctype html>
2+
<!--
3+
@license
4+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8+
Code distributed by Google as part of the polymer project is also
9+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10+
-->
11+
<html>
12+
<head>
13+
<title>Test Promise Polyfill</title>
14+
<script>window.Promise = null;</script>
15+
<script src="../webcomponents-loader.js"></script>
16+
<script src="../../web-component-tester/browser.js"></script>
17+
</head>
18+
<body>
19+
<script>
20+
suite('Promise', () => {
21+
test('catch works', () => {
22+
return Promise.reject('nope!').catch(() => {});
23+
});
24+
})
25+
</script>
26+
</body>
27+
</html>

docs/components/webcomponentsjs/tests/runner.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
// 'ce-upgradedocumenttree.html', // Does not exist in the v1 polyfill
3030
'ce-upgrade-order.html',
3131
// 'ce-import-upgrade.html', // Order of upgrade/import is different in v1
32-
// 'ce-import-upgrade-async.html'
32+
// 'ce-import-upgrade-async.html',
33+
'promise.html'
3334
]);
3435
</script>

0 commit comments

Comments
 (0)