Releases: Juicy/juicy-html
Releases · Juicy/juicy-html
Polymer dependency removed => Polymer 1.1 supported
Thanks to dependency removal we are not only support pure HTML/JavaScript usage, but it makes us fully compatible with Polymer 1.1 🎉
<juicy-html>
still lets you include HTML given in attribute or from external file.
But now it provides extremely simple - but native - binding feature, which attaches given object to all root nodes of loaded content. Such feature plays nice with Polymer's auto-binding templates, the only difference is that if you want to use it, you need to do it explicitly. (Yey! even more declarative).
If previously your code looked like:
<template bind id="tpl">
<template is="juicy-html" content="{{html}}" bind="{{data}}"></template>
</template>
<script>
document.getElementById("tpl").model = {
html: "<h1>Hello <strong>{{name}}</strong></h1>",
data: {
name: "World"
}
};
</script>
Now, it should look like
<template is="juicy-html"
content='
<template is="dom-bind">
<h1>Hello <strong>{{model.name}}</strong></h1>
</template>'
model="{
name: "World"
}">
</template>
Naturally, you can also wrap <template is="juicy-html">
within dom-bind
and provide content
, and model
attributes using binding. (check our demos, for more examples)
Polymer dependency removed
1.0.0-pre.1 Version 1.0.0-pre.1
0.0.20141119
- upgrade to latest Custom Elements spec
0.0.20140720
- repo was moved and renamed to Juicy/juicy-html
- most of
<template>
(Polymer's Template Binding) features are now also supported - Polymer dependency removed, Platform polyfills are the only dependency. Polymer is indirectly used as devDependency for core-menu demos.
Some breaking changes, extend <template>
x-html
now extends<template>
, so use it as<template is="x-html">
,- Inherit from
HTMLTemplateElement.prototype
, - Content is being added on
x-html
level (as a sibling), x-html
no longer bother about<script>
,<style>
, and<link type="import">
tags, it delagates this to<template>
. So you should be aware of execution order of inline and external scripts.
If you still need blocking for dynamically added scripts consider<imported-template>
.
0.0.20140326
- Compatibility changes for Polymer 0.2.2 (use element
templateInstance
property instead ofbindings
) (see ticket #7) - Add "web-components" keyword for CustomElements.io
0.0.20140221
- Compatibility changes for Polymer 0.2.0 and Canary
- Native
Node.prototype
is no longer modified
v0.0.20140210
- Compatibility changes for Polymer 0.1.4 and Canary (now works with native HTML Imports). See the discussion
- Allow Polymer Expressions in partials (e.g.
<template if="{{val == 1}}">
) - Updated
bower.json
to play well with Polymer 0.1.x (will resolve to most recent version if possible) - Refactor some functions to be actual XHTMLPrototype methods (cleaner code)
- Add "Rationale" section to the readme
v0.0.20140122
- Compatibility fix with Polymer 0.1.3 (needed to change a way the container's data model is retrieved in the partial template)
v0.0.20131220
- Compatibility fix with Polymer 0.1.1 (only changes in the examples, no change in actual
x-html.html
) - Moved the Polymer dependencies out of the repository for a better experience using Bower