Skip to content

initial try to update to current chrome extensions APIs #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spite
Copy link

@spite spite commented Sep 16, 2016

This is just a test to see if the original behaviour can be replicated.

Might need a better handling of script loading (for instance, WebRequest for dynamically loaded scripts). I have no idea about dynamically injected scripts, may be polling and checking the document's script tags.

@paulirish
Copy link

maybe this has actually has legs... ?

injected script will run before any page script. :)
that means we could wrap eval :D
we can also set up a mutationobserver early to watch for all scripts.

will mutationobserver run after script element has been created but before that script executes? :/

@spite
Copy link
Author

spite commented Sep 16, 2016

I've added support for eval and inline scripts spite@3c17082 but at this point what I'm having trouble is understanding what the instrumenting code actually does and expects the extension to do (I'm not familiar with Istanbul and its workings and format)

Since it seems that originally the extension used the eval'd result of the script processor, and we might be able to do away with it, may be it makes more sense to use message dispatching and chrome.runtime to pass the result to the devtools page, and even include the report directly intro the panel.

Re: mutationobserver, it should be tested. We can time things more or less accurately with content and injected scripts, and monitoring WebRequests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants