Created
May 25, 2015 17:33
-
-
Save shama/4d2760852cf8362ac15f to your computer and use it in GitHub Desktop.
Alternate way to load CSS file to ensure it gets loaded with a correct path with Electron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
Hi | |
<script> | |
var link = document.createElement('link') | |
link.setAttribute('rel', 'stylesheet') | |
link.setAttribute('href', require('path').join(__dirname, 'css', 'app.css')) | |
document.head.appendChild(link) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment