Comments (6)
Related https://discourse.elm-lang.org/t/fullscreen-elm-app-in-0-19-childnode-issue-reopened/3174
from browser.
Q: We are using Browser.application and inline svg-icons in the body which works fine. Though they are inserted there build-time. Are you doing it with some "webpack magic"?
from browser.
Rails, but it could be Webpack, gulp, whatever. It's not uncommon to do this.
from browser.
Made some tests and realised why it works for us is that we have the icons rendered after Elm.Main.init()
in body. Don't know the implications on this regarding best practice but at least it works and can be a workaround util other solutions. Our body-tag:
<body>
<!-- Elm -->
<script src="/app.js"></script>
<script>
var app = Elm.Main.init();
</script>
<!-- icons -->
<div style="display: none;">
<svg xmlns="http://www.w3.org/2000/svg">
<symbol viewBox="0 0 41 66" id="icon-pmt-logo"><title>pmt-logo</title>
<!-- svg icon -->
</symbol>
</svg>
</div>
</body>
from browser.
This is not ideal for us, we use Google Sign-In for all of our internal apps and this works by creating a hidden iframe, when Browser.application
wipes the <body>
clean it breaks our authentication.
Also, if the Elm.Main.init({node: ... })
parameter is going to be ignored I'd expect to see a warning about this in the console.
from browser.
😢 It breaks my Vim-like browser extension too.
from browser.
Related Issues (20)
- Debugger crashes when msg is triggered with large list in model HOT 2
- Broken links in `Browser.application` with prerendered content HOT 1
- Browser.Dom.Focus returns an Ok on disabled element
- If target "_self" is set, the url is loaded even if it's an internal request
- Not explained that pushUrl doesn't need whole URL to work
- Clipboard API support
- Selection API support
- A platform detection API
- Runtime exception in compiled elm script
- Expose "on" -function HOT 2
- Alike javascript getBBox() function
- getViewport returns incorrect viewport height HOT 1
- Ability to distinguish source of url change in onUrlChange
- Elm Application Crashes ... using a ScreenReader
- Developer experience: Not always clear how to init from JS
- `keypress` event is deprecated
- navigator.userAgent changing soon in Chrome
- Browser.Navigation.load doesn't actually cause a page load when url contains an #
- Support View Transitions API HOT 1
- Debugger stack overflow crash when msg triggered with large Set in model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser.