Code Monkey home page Code Monkey logo

Comments (5)

hoch avatar hoch commented on May 11, 2024

Seems like we have to use 'textContent' instead of 'src. Ick.

http://stackoverflow.com/questions/15730869/my-injected-script-runs-after-the-target-pages-javascript-despite-using-run

from audion.

chihuahua avatar chihuahua commented on May 11, 2024

To confirm, the problem is that the logic in tracing.js could run after the other logic in injection-content-script.js runs?

Wow, I wrongly thought that setting the src attribute of script tags blocked. Yeah, it seems like setting textContent's the way to go. Maybe we should lightly use a gulp build rule here to inline tracing.js? So we get syntax highlighting while editing tracing.js?

from audion.

chihuahua avatar chihuahua commented on May 11, 2024

Actually, we can synchronously fetch the script via an XHR - let me know what you think about #14.

from audion.

hoch avatar hoch commented on May 11, 2024

No - the problem is the injected code gets executed after the script code in the <body> element. For example, I have a bunch of code in the <body><script></script></body> and this runs earlier than the injected code - thus I got nothing in the visualizer.

from audion.

chihuahua avatar chihuahua commented on May 11, 2024

Ah k, I think the pull request should fix that since the content script
runs before other scripts in the page.
On Jul 6, 2016 10:39 AM, "Hongchan Choi" [email protected] wrote:

No - the problem is the injected code gets executed after the script code
in the element. For example, I have a bunch of code in the

<script></script> and this runs earlier than the injected code - thus I got nothing in the visualizer.


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEBqcfn6qm3QaCR0y9rnqiX1iKhcJ3rnks5qS8w0gaJpZM4JCjWy
.

from audion.

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.