I try to integrate a vis.js library (http://visjs.org) Timeline in a lightning component and i'm facing a problem when I activate the locker service (without, it works very well).
Timeline is correctly rendered but an error occured on hovering any element : "TypeError : cur.hasOwnProperty is not a function" on the method below
ItemSet.prototype.itemFromElement = function(element) {
var cur = element;
while (cur) {
if (cur.hasOwnProperty('timeline-item')) {
return cur['timeline-item'];
}
cur = cur.parentNode;
}
return null;
};
The method is called on hovering the timeline to find a specific element. The element returned is a simple Html element like
<div class="vis-foreground">...</div>
I think I have to rewrite some parts to be compatible but after a long time debugging on Chrome dev tools I'm really blocked...
A simple example picked from this page throws the exception : http://visjs.org/timeline_examples.html