Giter VIP home page Giter VIP logo

Comments (5)

mgood avatar mgood commented on July 20, 2024

I don't think the opening <html> tag should matter. It is looking for the </body> to figure out where to insert the HTML: here

What does the end of your html template look like?

from flask-debugtoolbar.

mattupstate avatar mattupstate commented on July 20, 2024

This is the whole template:

<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="description" content="{% block meta_description %}Description{% endblock %}">
  <meta name="author" content="{% block meta_author %}Author{% endblock %}">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>Simple App</title>
</head>
<body>
  {{ content }}
</body>
</html>

from flask-debugtoolbar.

mattupstate avatar mattupstate commented on July 20, 2024

Actually, it seems to be a JavaScript problem when using that template:

Uncaught Error: HIERARCHY_REQUEST_ERR: DOM Exception 3
    (anonymous function)    :5000/_debug_toolbar/static/js/toolbar.js:14
    (anonymous function)    :5000/_debug_toolbar/static/js/toolbar.js:16

from flask-debugtoolbar.

mgood avatar mgood commented on July 20, 2024

Yeah, ok it looks like there's a bug in the way the toolbar.js tries to conditionally inject the jQuery script (to avoid conflicting with another version on the same page). I'll look into the right way to handle this.

from flask-debugtoolbar.

mgood avatar mgood commented on July 20, 2024

The toolbar JS would inject a <script> tag to include jQuery if it wasn't already available, but that would fail when the comments around the <html> tag were present.

I've fixed it to just use the standard jQuery.noConflict() pattern.

from flask-debugtoolbar.

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.