Giter Club home page Giter Club logo

Comments (9)

surunzi avatar surunzi commented on May 18, 2024 1

@anaibol It's on Jsdelivr now, and thanks for your advice. https://cdn.jsdelivr.net/eruda/1.0.0/eruda.min.js

from eruda.

surunzi avatar surunzi commented on May 18, 2024

Judging from the error message, it is not caused by misspelling, probably the dom node currently viewing is deleted. Can you use the uncompressed one to see which line exactly is causing the problem? Since there are several places using getComputedStyle api, including some third party libs. Thanks:)

from eruda.

leo108 avatar leo108 commented on May 18, 2024

same problem, the error line is 3010, relative code is

Draggabilly.prototype._getPosition = function() {
  var style = getComputedStyle( this.element ); // this line
  var x = this._getPositionCoord( style.left, 'width' );
  var y = this._getPositionCoord( style.top, 'height' );
  // clean up 'auto' or other non-integer values
  this.position.x = isNaN( x ) ? 0 : x;
  this.position.y = isNaN( y ) ? 0 : y;

  this._addTransformPosition( style );
};

from eruda.

surunzi avatar surunzi commented on May 18, 2024

The tool will append a dom node as container to body when initialized, Looks like the dom is somehow erased afterwards. Are you guys using some frameworks that will rewrite the whole body content?

I'm planning on moving it to outside of body, hopefully it's going to solve this problem:)

from eruda.

leo108 avatar leo108 commented on May 18, 2024

Put the script tag at the end of document should be OK, I came across this problem just because I put it in the head tag

from eruda.

surunzi avatar surunzi commented on May 18, 2024

@leo108 Container element is now appended to html tag, should be ok to put it in head tag now.
@anaibol Did you put the script inside head tag too?

from eruda.

anaibol avatar anaibol commented on May 18, 2024

I am executing the script on componentDidMount of React.
I don't have that error now, but Eruda is replacing all my DOM.
Before
selection_034
After
selection_035

from eruda.

surunzi avatar surunzi commented on May 18, 2024

Oh, I haven't used this tool in a full-react application yet. Will try to figure out a way to solve it later. Thanks for reporting the issue.

from eruda.

anaibol avatar anaibol commented on May 18, 2024

Cool! I was thinking, it would be interesting also to submit it later to a CDN like Jsdelivr, because you want to async and condicionally load the debugger, it should be easier to load it from an external CDN instead of making maybe a webpack entrypoint only for the debugger.

from eruda.

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.