Reputation: 152
Something like this:
this.token = document.getElementById("token").getAttribute("content");
Even better, get the meta element by Name
Upvotes: 0
Views: 201
Reputation: 12295
Try this:
document.querySelector('meta[name="name"]').getAttribute("content");
Upvotes: 2