Compare commits

..

27 Commits

Author SHA1 Message Date
cd4c5b43d7 Added an OnEscape helper function to capture when the escape key is pressed on an element quickly. 2025-05-27 18:24:00 -07:00
ed49ad1392 Changed element.data to nodeValue since that is the official property. 2024-11-20 07:50:29 -08:00
812f8352f5 Fixed an issue where not all the results of the intersection observer were being checked. 2024-09-02 16:19:40 -07:00
939d1ec83a Added a new after render function for elements. 2024-03-18 09:33:16 -07:00
9040bb8d45 Added ability to use arrays of properties for the property function. 2023-12-24 15:21:43 -08:00
82834320f6 Added ol template. 2023-12-24 09:51:36 -08:00
4e0bb96747 Fixed an issue where the converter wasn't running on the first construct. 2023-12-11 16:58:18 -08:00
23f8fa5b72 Moved option construction before setting element value. 2023-11-28 19:16:15 -08:00
7f2b6465c2 Added new options function that can generate a set of options from an input and allow them to be converted. Modified the converter template to support an array of ignite properties as the input. The converter now supports the value converter returning an array of ignite templates. This allows for more complex conversions. 2023-11-10 12:10:17 -08:00
2d41cb26a0 Fixed an issue where the source element wouldn't load the video when the src attribute is changed. 2023-11-07 09:25:51 -08:00
3eadebec0c Fixed some major issues with list splice construction and other templates incorrectly constructing an element after a specified sibling. Improved documentation as well. 2023-11-07 08:25:54 -08:00
f1b1ae5c13 Added video template and source template. Added code so that if the src attribute is changed on a source element it automatically pauses the video and resets the position to 0. 2023-11-06 16:35:02 -08:00
def9a0c837 Added new type ahead feature, documented it and tested it. 2023-11-03 20:43:45 -07:00
7c8ce52537 Updated more documentation. 2023-11-01 08:25:14 -07:00
ab7209f5bf Updated style docs to include the use of an array of ignite properties. 2023-11-01 08:12:13 -07:00
7e1e2b96ff Fixed a minor bug where list splice wouldn't insert the item in the DOM at the correct position in the list. 2023-10-31 22:45:02 -07:00
a584eb68a7 Fixed a minor issue with attachOnDisconnect for the list template. 2023-10-17 15:32:22 -07:00
f4e314c7be Added iframe element template. 2023-10-11 18:01:33 -07:00
645af63c30 Modified ignite template properties function to dynamically change properties. Fixed a few bugs as well. 2023-08-11 17:33:39 -07:00
d080d8e175 Cleaned up the converter template and fixed a bug. 2023-07-26 17:37:39 -07:00
f531a518b9 Added new converter template that can be used to convert a value into something that can be rendered. 2023-07-25 23:21:54 -07:00
841d03d2c3 Added a special onDeconstruct template function that allows a function to be invoked when the element is being destroyed. 2023-07-24 08:51:54 -07:00
e4602b710d Fixed a bug where on a class change we didn't check to see if the element existed. 2023-07-23 22:05:00 -07:00
63ed3a42f9 Fixed an issue where the text constructor wasn't handling the rendering state when call the converter. 2023-07-21 10:24:06 -07:00
7905758894 Added a null and length check for pages before trying to modify their elements. 2023-07-17 12:33:46 -07:00
08a526ad4a Merge remote-tracking branch 'origin/master' 2023-07-11 08:08:59 -07:00
aaa593e846 Removed old code that would try to force ignite properties to stay as the same value type as their previous value. This causes issues and the developer should be free to set properties to whatever value they want. 2023-07-11 08:08:23 -07:00
3 changed files with 695 additions and 59 deletions

View File

@ -295,6 +295,11 @@ class IgniteElement extends HTMLElement {
//Leave the rendering context.
IgniteRendering.leave();
//Invoke the after render function, ensure we are not in a rendering context.
IgniteRendering.push();
this.afterRender();
IgniteRendering.pop();
//Let the rendering context know this element is ready.
IgniteRendering.ready(this.readyCallback);
}
@ -372,6 +377,14 @@ class IgniteElement extends HTMLElement {
return null;
}
/**
* Called right after this element is rendered.
* Note: It's not guaranteed this element is connected to the DOM yet, but it will at least be fully initialized.
*/
afterRender() {
}
/**
* Called when this ignite element is being initialized. When this is called
* the element has not been created. This is good for login checking code or special setup code.

View File

@ -107,17 +107,6 @@ class IgniteProperty {
//Get the old value
var old = this._value;
//Based on the old value, see if we need to convert the new value to match the original type.
if (typeof old === typeof true) {
val = val != null && val != undefined ? val.toString().toLowerCase().trim() : val;
val = val == "true" || val == "1" || val == "yes" || val == "t" || val == "y";
} else if (typeof old === typeof 0) {
val = Number(val != null && val != undefined ? val.toString().trim() : "0");
val = isNaN(val) ? 0 : val;
} else if (typeof old === typeof "") {
val = val != null && val != undefined ? val.toString() : null;
}
//Set the new value
this._value = val;

File diff suppressed because it is too large Load Diff