Skip to content

Commit b13f294

Browse files
committed
[ci skip] add note about 1.x branch
1 parent fcfdd09 commit b13f294

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This branch contains a preview of the Polymer 2.0 library. The codebase is unde
44

55
🚧 **To evaluate Polymer 2.0**, please load the `webcomponentsjs/webcomponents-lite.js` or `webcomponentsjs/webcomponents-loader.js` polyfills from the `v1` branch of [`webcomponentsjs`](https://github.com/webcomponents/webcomponentsjs/tree/v1/)
66

7+
👀 **Looking for Polymer v1.x?** Please see the [the v1 branch](https://github.com/Polymer/polymer/tree/1.x)
8+
79
## Polymer 2.0 Goals
810

911
1. **Take advantage of native "v1" Web Components implementations across browsers.**
@@ -273,15 +275,15 @@ id is to use `id`.
273275
* <a name="breaking-url-changes"></a>In Polymer 1.x, URLs in attributes and styles inside element templates were re-written to be relative to the element HTMLImport. Based on user feedback, we are changing this behavior.
274276
275277
Two new properties are being added to `Polymer.Element`: `importPath` and `rootPath`. The `importPath` property is a static getter on the element class that defaults to the element HTMLImport document URL and is overridable. It may be useful to override `importPath` when an element `template` is not retrieved from a `dom-module` or the element is not defined using an HTMLImport. The `rootPath` property is set to the value of `Polymer.rootPath` which is globally settable and defaults to the main document URL. It may be useful to set `Polymer.rootPath` to provide a stable application mount path when using client side routing. URL's in styles are re-written to be relative to the `importPath` property. Inside element templates, URLs in element attributes are *no longer* re-written. Instead, they should be bound using `importPath` and `rootPath` where appropriate. For example:
276-
278+
277279
A Polymer 1.x template that included:
278-
280+
279281
```html
280282
<img src="foo.jpg">
281283
```
282-
284+
283285
in Polymer 2.x should be:
284-
286+
285287
```html
286288
<img src$="[[importPath]]foo.jpg">
287289
```

0 commit comments

Comments
 (0)