Black Lives Matter. Please consider donating to Black Girls Code today.

Accessing layers

I am using the following code:
var layer = div_chart.getElementsByClassName(‘nsewdrag’)[i];
if (layer.dataset.subplot) …

to find a layer that represents a specific subplot, something like “x2y2”. Works fine in chrome, but IE has no dataset. How else can I find a specific layer?


This could be related:

The question is about layer.dataset.subplot. Dataset doesn’t exist in IE11.