@@ -14,27 +14,15 @@ In your web page, include
14
14
15
15
```
16
16
17
- For IE11, use the ES5 version:
18
-
19
- ```
20
- <script src="source-minified/native-shim.js"></script>
21
- <script src="source-minified/smart.element-polyfills.js"></script>
22
- <script src="source-minified/smart.element.js"></script>
23
-
24
- ```
25
-
26
-
27
17
Optional polyfill for browsers without custom elements support: ` webcomponents-lite.js `
28
18
29
- ## Working with Transpiled ES5 Files
30
- When using ES5/minified files, you would also need to include a reference to the file ** native-shim.js** (it can be found alongside ** smart.element.js** and ** smart.element-polyfills.js** ).
31
19
32
20
## Version and Deployment
33
21
- This package is version according to [ semantic versioning] ( http://semver.org ) .
34
22
35
23
## Browser Support and Compatibility
36
24
37
- ** [ Requires ES2015 classes] ( https://caniuse.com/es6-class ) . IE11 and below not supported. **
25
+ ** [ Requires ES2015 classes] ( https://caniuse.com/es6-class ) . Edge, Chrome, Safari and Firefox. Requires Webcomponents polyfill for Edge and Safari **
38
26
39
27
- ** If targeting browsers that natively support ES2015, but not native Web Components:**
40
28
@@ -203,6 +191,7 @@ Use for one-time set-up before property values are set.
203
191
* attached - Called after the element is attached to the document. Can be called multiple times during the lifetime of an element.
204
192
* ready - Called when the element is ready. Use for one-time configuration of your element.
205
193
* detached - Called after the element is detached from the document. Can be called multiple times during the lifetime of an element.
194
+ * completed - Called after the element and any custom elements in its template are ready, rendered and attached to the DOM. Completed is called once.
206
195
207
196
## Properties
208
197
@@ -234,15 +223,8 @@ Example:
234
223
< head>
235
224
< meta http- equiv= " X-UA-Compatible" content= " IE=edge,chrome=1" / >
236
225
< meta name= " viewport" content= " width=device-width, initial-scale=1" / >
237
- < link rel= " stylesheet" href= " styles/smart.base.css" type= " text/css" / >
238
- < script type= " text/javascript" src= " https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-lite.js" >< / script>
239
- < script type= " text/javascript" src= " https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-loader.js" >< / script>
240
- < script type= " text/javascript" src= " smart.element.js" >< / script>
241
- < script type= " text/javascript" src= " smart.button.js" >< / script>
242
- < script type= " text/javascript" src= " smart.scrollbar.js" >< / script>
243
- < script type= " text/javascript" src= " smart.listbox.js" >< / script>
244
- < script type= " text/javascript" src= " smart.checkbox.js" >< / script>
245
- < script type= " text/javascript" src= " smart.radiobutton.js" >< / script>
226
+ < link rel= " stylesheet" href= " styles/smart.default.css" type= " text/css" / >
227
+ < script type= " text/javascript" src= " smart.elements.js" >< / script>
246
228
< script>
247
229
window .onload = function () {
248
230
var list = document .getElementById (' list' );
@@ -370,9 +352,7 @@ Smart('my-element', class MyElement extends Smart.BaseElement {
370
352
<!DOCTYPE html>
371
353
<html lang="en">
372
354
<head>
373
- <link rel="stylesheet" href="styles/smart.base.css" type="text/css" />
374
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-lite.js"></script>
375
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-loader.js"></script>
355
+ <link rel="stylesheet" href="styles/smart.default.css" type="text/css" />
376
356
<script type="text/javascript" src="../../source/smart.element.js"></script>
377
357
<script type="text/javascript" src="../../source/myelement.js"></script>
378
358
<script>
@@ -476,17 +456,17 @@ By invoking `Smart.Utilities.Extend(element)` you can extend any element with th
476
456
In order to add a custom utility class, you can use ` Smart.Utilities.Assign(classDefinition) ` .
477
457
478
458
``` javascript
479
- Smart .Utilities .Assign (' BaseNumericProcessor ' , class BaseNumericProcessor {
459
+ Smart .Utilities .Assign (' defaultNumericProcessor ' , class defaultNumericProcessor {
480
460
}
481
461
` ` `
482
462
483
- To access that class, you can use ` Smart .Utilities .BaseNumericProcessor ` .
463
+ To access that class, you can use ` Smart .Utilities .defaultNumericProcessor ` .
484
464
485
465
` ` ` * if and * items template directives.` ` `
486
466
487
467
If in the Template's definition, we have a HTMLTemplateElement, we can use these directives to insert HTML.
488
468
489
- * *if - Conditionally includes a template based on the value of a property.
469
+ * *if - Conditionally includes a template defaultd on the value of a property.
490
470
* *items - Repeating a template by using each item of an iterable as that template's context.
491
471
* templateAttached - function called when the HTMLTemplateElement is attahed to the DOM.
492
472
* templateDetached - function called when the HTMLTemplateElement is detached from the DOM.
@@ -697,17 +677,8 @@ The following example demonstrates how to use the ```DataContext``` feature.
697
677
< head>
698
678
< meta http- equiv= " X-UA-Compatible" content= " IE=edge,chrome=1" / >
699
679
< meta name= " viewport" content= " width=device-width, initial-scale=1" / >
700
- < script type= " text/javascript" src= " https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js" >< / script>
701
- < link rel= " stylesheet" href= " styles/smart.base.css" type= " text/css" / >
702
- < script type= " text/javascript" src= " smart.element.js" >< / script>
703
- < script type= " text/javascript" src= " smart.button.js" >< / script>
704
- < script type= " text/javascript" src= " smart.scrollbar.js" >< / script>
705
- < script type= " text/javascript" src= " smart.listbox.js" >< / script>
706
- < script type= " text/javascript" src= " smart.checkbox.js" >< / script>
707
- < script type= " text/javascript" src= " smart.radiobutton.js" >< / script>
708
- < script type= " text/javascript" src= " smart.dropdownlist.js" >< / script>
709
- < script type= " text/javascript" src= " smart.combobox.js" >< / script>
710
- < script type= " text/javascript" src= " smart.textbox.js" >< / script>
680
+ < link rel= " stylesheet" href= " styles/smart.default.css" type= " text/css" / >
681
+ < script type= " text/javascript" src= " smart.elements.js" >< / script>
711
682
< script>
712
683
window .onload = function () {
713
684
const data = [
@@ -821,12 +792,9 @@ Custom Module which adds a new `color` property to the `smart-button` custom ele
821
792
< ! DOCTYPE html>
822
793
< html lang= " en" >
823
794
< head>
824
- < link rel= " stylesheet" href= " ../../source/styles/smart.base .css" type= " text/css" / >
795
+ < link rel= " stylesheet" href= " ../../source/styles/smart.default .css" type= " text/css" / >
825
796
< link rel= " stylesheet" href= " ../styles/demos.css" type= " text/css" / >
826
- < script type= " text/javascript" src= " https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-lite.js" >< / script>
827
- < script type= " text/javascript" src= " https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.1.0/webcomponents-loader.js" >< / script>
828
- < script type= " text/javascript" src= " ../../source/smart.element.js" >< / script>
829
- < script type= " text/javascript" src= " ../../source/smart.button.js" >< / script>
797
+ < script type= " text/javascript" src= " ../../source/smart.elements.js" >< / script>
830
798
< script>
831
799
class ColorModule {
832
800
static get properties () {
0 commit comments