@@ -260,27 +260,29 @@ Once instantiated in the web client code, the microdata-template can be addresse
260260``` javascript
261261// In pre-ES6 implementations, the code is exposed to the global namespace:
262262var templater = window .MicrodataTemplate .init ();
263- templater .getVerson (); // returns current version, e.g. "2.2.2 "
263+ templater .getVerson (); // returns current version, e.g. "2.3.0 "
264264
265265// In ES6 implementations, the import code does not require init()
266266import templater from " ./path/to/microdata-template.js" ;
267- templater .getVersion (); // returns current version, e.g. "2.2.2 "
267+ templater .getVersion (); // returns current version, e.g. "2.3.0 "
268268
269269// Defaults are assumed, but configuration can be passed to init:
270270templater .init ({
271271 showHeritage: true , // bypass obj.hasOwnProperty() filtering.
272- strictStandard: true // require Microdata attributes.
272+ strictStandard: true , // require Microdata attributes.
273+ stripByteOrderMark: false // leave HTML unperturbed.
273274});
274275```
275276
276- | Method Name | Argument(s) | Description |
277- | -------------| -------------| -------------|
277+ | Method Name | Argument(s) | Description |
278+ | -------------| -------------| --------------------------------------------------------------------------- |
278279| ` init ` | * Object (optional)* | Returns an instance of the microdata-template. Config object is optional. |
279- | ` render ` | * element, data* | Populates the HTML element template with data. |
280- | ` clear ` | * element, callback* | Removes dynamically populated content, retaining the original template. |
281- | ` refresh ` | * element, data* | Makes current a previously rendered template. |
282- | ` getSetShowHeritage ` | * Boolean* | False by default. When true, bypasses obj.hasOwnProperty() filtering. |
283- | ` getSetStrictStandard ` | * Boolean* | False by default. When true, Microdata attributes are always required. |
284- | ` setTransformer ` | * name, func* | Provides for a custom transformer. |
285- | ` getTransformers ` | * none* | Returns default and custom transformers. |
286- | ` getVersion ` | * none* | Returns the current version. |
280+ | ` render ` | * element, data* | Populates the HTML element template with data. |
281+ | ` clear ` | * element, callback* | Removes dynamically populated content, retaining the original template. |
282+ | ` refresh ` | * element, data* | Makes current a previously rendered template. |
283+ | ` getSetShowHeritage ` | * Boolean* | False by default. When true, bypasses obj.hasOwnProperty() filtering. |
284+ | ` getSetStrictStandard ` | * Boolean* | False by default. When true, Microdata attributes are always required. |
285+ | ` getSetStripByteOrderMark ` | * Boolean* | True by default. When true, strips Byte Order Mark from incoming HTML snippets. |
286+ | ` setTransformer ` | * name, func* | Provides for a custom transformer. |
287+ | ` getTransformers ` | * none* | Returns default and custom transformers. |
288+ | ` getVersion ` | * none* | Returns the current version. |
0 commit comments