kadirahq / meteor-dochead

Isomorphic way to manipulate document.head for Meteor apps
MIT License
132 stars 17 forks source link

loadScript with data-foo #38

Open thierryler opened 7 years ago

thierryler commented 7 years ago

Hello,

I'd like to add a lib with the same result as follow:

<script data-foo src='https://foo.com/foo.js' async></script>

I see I can do that (async is default):

DocHead.loadScript('https://foo.com/foo.js', () => {
  console.log('foo is ready');
});

But what is the best way to add data-foo ?

Thx