beautify html
This commit is contained in:
parent
ecf1478e7e
commit
5342f628da
354 changed files with 13965 additions and 9486 deletions
|
@ -1,56 +1,60 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<link rel="import" href="jquery.html">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<template id="tmpl">
|
||||
<style>
|
||||
@import url(http://code.jquery.com/ui/1.11.3/themes/ui-lightness/jquery-ui.css);
|
||||
<template id="tmpl">
|
||||
<style>
|
||||
@import url(http://code.jquery.com/ui/1.11.3/themes/ui-lightness/jquery-ui.css);
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<div id="slider"></div>
|
||||
</template>
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<div id="slider"></div>
|
||||
</template>
|
||||
<script>
|
||||
! function() {
|
||||
var localDocument = document.currentScript.ownerDocument;
|
||||
var tmpl = localDocument.getElementById('tmpl');
|
||||
|
||||
<script>
|
||||
!function() {
|
||||
var localDocument = document.currentScript.ownerDocument;
|
||||
var tmpl = localDocument.getElementById('tmpl');
|
||||
var SliderProto = Object.create(HTMLElement.prototype);
|
||||
|
||||
var SliderProto = Object.create(HTMLElement.prototype);
|
||||
SliderProto.createdCallback = function() {
|
||||
var root = this.createShadowRoot();
|
||||
root.appendChild(tmpl.content.cloneNode(true));
|
||||
|
||||
SliderProto.createdCallback = function() {
|
||||
var root = this.createShadowRoot();
|
||||
root.appendChild(tmpl.content.cloneNode(true));
|
||||
this.$slider = $(root.getElementById('slider'));
|
||||
|
||||
this.$slider = $(root.getElementById('slider'));
|
||||
|
||||
var self = this;
|
||||
var self = this;
|
||||
|
||||
this.$slider.slider({
|
||||
min: +this.getAttribute('min') || 0,
|
||||
max: +this.getAttribute('max') || 100,
|
||||
value: this.getAttribute('value') || 0,
|
||||
slide: function() {
|
||||
var event = new CustomEvent("slide", {
|
||||
detail: { value: self.$slider.slider("option", "value") },
|
||||
bubbles: true
|
||||
this.$slider.slider({
|
||||
min: +this.getAttribute('min') || 0,
|
||||
max: +this.getAttribute('max') || 100,
|
||||
value: this.getAttribute('value') || 0,
|
||||
slide: function() {
|
||||
var event = new CustomEvent("slide", {
|
||||
detail: {
|
||||
value: self.$slider.slider("option", "value")
|
||||
},
|
||||
bubbles: true
|
||||
});
|
||||
self.dispatchEvent(event);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
document.registerElement('ui-slider', {
|
||||
prototype: SliderProto
|
||||
});
|
||||
self.dispatchEvent(event);
|
||||
}
|
||||
});
|
||||
};
|
||||
}();
|
||||
</script>
|
||||
|
||||
|
||||
document.registerElement('ui-slider', {
|
||||
prototype: SliderProto
|
||||
});
|
||||
}();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue