Releases: williamtroup/JHson.js
Releases 路 williamtroup/JHson.js
JHson v1.1.0 - Use Strict! Major fix!
- Added "use strict" support internally and updated all public functions to use the new scope.
- Fixed a fault that caused the function parameter "properties" to collide with an outer scope variable of the same name for "json() > ignoreCssProperties()".
JHson.js v1.0.0 - Binding support for JSON to HTML!
New Features:
- Added binding support! You can now add the attribute "data-jhson-options" to any DOM element to bind JSON, which will be written as HTML.
Binding Options:
- Added binding options support, which is based on all the options available to "html()".
Binding Options - Custom Triggers:
- Added binding option custom trigger "onBeforeRenderComplete", which fires before the rendering of an element.
- Added binding option custom trigger "onRenderComplete", which fires when the rendering of an element is complete.
Public Functions:
- Added a new public function called "renderAll()", which will find all the DOM elements with the attribute assigned and render their JSON as HTML.
Fixes & Improvements:
- Fixed a major fault that caused the scope of the chained functions to fail when specific methods were called.
- Updated the main project description.
JHson.js v0.9.0 - New method, improvements and fixes!
Public Functions:
- Added "generateUniqueMissingIds()" support for "json()", which states if the JSON should contain unique IDs for elements that don't contain them.
Fixes & Improvements:
- Fixed a fault that allowed the text to be obtained for a textarea DOM element when the option "includeText()" is set to false.
- Improved the support for returning the correct scope when calling chained functions.
JHson.js v0.8.0 - New methods!
Public Functions:
- Added "getVariables()" support for "html()", which is used to get all the template variables from an HTML DOM element.
- Added "getVariables()" support for "json()", which is used to get all the template variables from a JSON string.
JHson.js v0.7.0 - New functions! Renames! Clean ups!
Public Functions:
- BREAKING: Renamed "html() > removeAttributes()" to "html() > removeOriginalAttributes()".
- BREAKING: Renamed "html() > clearHTML()" to "html() > clearOriginalHTML()".
- Added "addAttributes()" support for "html()", which states if the attributes should be written for each element when "write()" is called.
- Added "addCssProperties()" support for "html()", which states if the CSS properties should be written for each element when "write()" is called.
- Added "addText()" support for "html()", which states if the text should be written for each element when "write()" is called.
- Added "addChildren()" support for "html()", which states if the children should be written for each element when "write()" is called.
Fixes & Improvements:
- Internal refactoring to make areas a bit easier to read.
JHson.js v0.6.0 - New configuration! New method! Fixes!
Public Functions:
- Added "logTemplateDataWarnings()" support for "html()", which states if the template variables are not found should be logged as warnings when "write()" is called.
Configuration Options:
- Added new configuration option "variableWarningText", which states the warning text that should be shown in the console when a template variable is not used (defaults to "Template variable {{variable_name}} not found.").
- Added new configuration option "objectErrorText", which states the error text that should be shown when an object error is detected (defaults to "Errors in object: {{error_1}}, {{error_2}}").
Fixes & Improvements:
- Fixed "clearCssFromHead()" throwing an error when clearing the style tags from the DOM documents head.
- Updated README.md and README_NUGET.md to include the latest chained function calls.
- Minor internal renames to make way for future enhancements.
JHson.js v0.5.0 - More method! Fixes and improvements!
Public Functions:
- BREAKING: Renamed "json() > includeCssStyles()" to "json() > includeCssProperties()".
- When "addCssToHead()" is used for "html()", all the CSS is now placed in one "style" node in the HTML document head, instead of multiple ones!
- When "addCssToHead()" is used for "html()", the CSS will now use the CSS class from the DOM element (it reverts to the DOM element ID if not available).
- Added "ignoreNodeTypes()" support for "json()", which states the node types that should not be included in the JSON returned from "get()".
- Added "ignoreCssProperties()" support for "json()", which states the CSS properties that should not be included in the JSON returned from "get()".
- Added "ignoreAttributes()" support for "json()", which states the attributes that should not be included in the JSON returned from "get()".
Configuration Options:
- Removed the configuration option "nodeTypesToIgnore" (no longer needed).
- Removed the configuration option "cssPropertiesToIgnore" (no longer needed).
Fixes & Improvements:
- Fixed a minor formatting issue in the "package.json" file.
- Fixed a fault that caused the text to be ignored for some elements.
- Fixed HTML testing files not referencing some of the recent changes.
- Fixed issues with lowercase usage being done multiple times.
- Updated README.md and README_NUGET.md to include the latest chained function calls.
- Updated README.md and README_NUGET.md to include the new features added recently.
JHson v0.4.0 - CSS writing to document head support! New options!
New Features:
- CSS styles can now be written to the head of the HTML document instead of each DOM element!
Public Functions:
- Added "addCssToHead()" support for "html()", which will force all CSS style properties to be added as "style" tags to the head of the HTML document.
- Added "indentSpaces()" support for "json()", which states the total number of indent spaces to use for the friendly format JSON returned from "get()".
- Added "clearCssFromHead()" support for "html()", which will force all CSS style tags to be removed from the head of the HTML document.
Configuration Options:
- Removed the configuration option "jsonIndentationSpaces" (no longer needed).
JHson.js v0.3.0 - Improved function chaining!
Public Functions:
- All boolean-based chained functions (such as "json()" > "includeAttributes()") now support flags (with proper defaults).
- Restored all original defaults for the new chained functions.
- Object types now have to be valid for all public functions.
Fixes & Improvements:
- Improved the HTML testing files.
- Fixed README.md and README_NUGET.md errors.
JHson.js v0.2.0 - Function chaining! More options.
New Features:
- Added function chaining support when getting and writing (see detailed changes).
Public Functions:
- BREAKING: "get()" has been renamed to "json()" and now supports function-chaining, which allows greater control over the options used when generating the JSON.
- BREAKING: "write()" has been renamed to "html()" and now supports function-chaining, which allows greater control over the options used when converting JSON to HTML.
- "html()" now supports: "removeAttributes()" and "clearHTML()".
- "json()" now supports: "includeChildren()".
Configuration Options:
- Added new configuration option "formattingNodeTypes", which states the text formatting nodes to check for (defaults to "b strong i em mark small del ins sub sup").
Fixes & Improvements:
- Fixed a fault that caused all pre-configured configuration options to be wiped out when calling "setConfiguration()".
- Improved the HTML testing files.