DMR in plain JS