samedi 7 mai 2016

What is the equivalent of using document.getElementsByName(anchorName)[0] in Ember 2.x.x?

  click: function (e) {
    e.preventDefault();
    var targetName = e.target.hash.split('#')[1],
    targetContent = document.getElementsByName(targetName)[0];
    this.scrollViewTo(targetContent, 'header', -10);
  }

In the above function is there any equivalent of document.getElementsByName(targetName)[0] to use in ember?




Aucun commentaire:

Enregistrer un commentaire