Hi everyone, I'm using some javascript to animate some stacked cards and I keep running into a weird problem and I've narrowed it down to this,
this.element = element;
this.items = this.element.getElementsByClassName('js-stack-cards__item');
Now the above codes get the items by their class name and stores it into "items"
After that, I'm trying to run this function which fails only in AwareIM for some reason.
var cardStyle = getComputedStyle(element.items[0]);
I know element.items are returning 28 items as an HTMLCollection by doing a console log,
console.log(element.items);
Now, the funny part is, this all works in a regular html file, but in aware, when I try to find the first item by using [0], it returns as undefined and the whole script fails because of that, I know how I'm getting an undefined value by doing this
console.log(element.items[0]);
The above [0] is a standard in javascript and is literally working everywhere else except for AwareIM, have anyone experienced this before? And if so, what were your solutions, thanks for your time.
P.S, all of this is in a rendered script inside of a custom list in a form.