https://github.com/startpolymer/s-html
Element wrapper of .innerHTML for data binding with HTML elements.
https://github.com/startpolymer/s-html
Last synced: about 1 year ago
JSON representation
Element wrapper of .innerHTML for data binding with HTML elements.
- Host: GitHub
- URL: https://github.com/startpolymer/s-html
- Owner: StartPolymer
- Created: 2016-09-26T22:35:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-09T20:40:36.000Z (about 4 years ago)
- Last Synced: 2025-06-11T21:12:09.076Z (about 1 year ago)
- Language: HTML
- Homepage:
- Size: 5.86 KB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# <s-html>
Element wrapper of `.innerHTML` for data binding with HTML elements.
## Usage
### Example 1
Localize text with HTML elements using [app-localize-behavior](https://github.com/PolymerElements/app-localize-behavior).
locales.json
```json
{
"text": "Settings"
}
```
HTML
```html
```
### Example 2
Using `span` element for content styled with CSS.
locales.json
```json
{
"text": "Settings"
}
```
CSS
```css
.red {
color: red;
}
```
HTML
```html
```
### Example 3
Unescape escaped HTML elements.
locales.json
```json
{
"text": "polymer <br>"
}
```
HTML
```html
```
## Installation
`bower i s-html -S`
## License
MIT: [StartPolymer/license](https://github.com/StartPolymer/license)