Code Monkey home page Code Monkey logo

Comments (6)

albertdahlin avatar albertdahlin commented on May 31, 2024

Related https://discourse.elm-lang.org/t/fullscreen-elm-app-in-0-19-childnode-issue-reopened/3174

from browser.

mikaxyz avatar mikaxyz commented on May 31, 2024

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.

toastal avatar toastal commented on May 31, 2024

Rails, but it could be Webpack, gulp, whatever. It's not uncommon to do this.

from browser.

mikaxyz avatar mikaxyz commented on May 31, 2024

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.

ianp avatar ianp commented on May 31, 2024

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.

toastal avatar toastal commented on May 31, 2024

😢 It breaks my Vim-like browser extension too.

from browser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.