An open API service indexing awesome lists of open source software.

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.

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)