-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script tag in head causes error #75
Comments
Sorry that set you back. Do you have a stacktrace for the error you ran into? Maybe it's possible to update the code to work regardless of where the script tag is placed. |
I think it's just that the DOM isn't loaded yet, so
In (let [link (.createElement js/document "link")]
(doto link
(.setAttribute "rel" "stylesheet")
(.setAttribute "href" stylesheet-url))
(.appendChild (-> js/document .-body) ; this throws
link)))) |
Sounds good. The membrane.webgl namespace probably shouldn't do anything on load anyway. It seems like this issue and #49 can be fixed by:
With those changes, it should support any script tag location or loading mechanism. |
Not a membrane issue per se but it cost me way too much of my life when trying to follow the "Membrane with WebGL target" doc: putting the script tag in the head rather than the body broke everything.
The text was updated successfully, but these errors were encountered: