Skip to content
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

How do you load the script from the indexeddb to actual scripts tab #16

Open
khanakia opened this issue Feb 22, 2021 · 1 comment
Open

Comments

@khanakia
Copy link

khanakia commented Feb 22, 2021

Hello @apeschar,

First of all thanks for the great plugin. I have few questions and trying to learn how the plugin works under the hood.
I see you send the XHR request and loads all the scripts in the indexed db.

But after that how do you load the scripts into SCRIPTS TAG because i do not see any JS file request sending in the Chrome developer tools.

It would be helpful if you give me some insight on this how are you loading the scripts from indexdb to actual <script> tag ?

Thanks

@apeschar
Copy link
Member

This is the code for the scripts execution:

https://github.com/kiboit/phast/blob/master/src/Filters/HTML/ScriptsDeferring/scripts-loader.js#L77-L98

If you read the whole file, you'll understand how Phast executes scripts.

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

No branches or pull requests

2 participants