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

Execute <script> tags added from javascript #24

Closed
EtienneCoumont opened this issue Feb 27, 2016 · 3 comments
Closed

Execute <script> tags added from javascript #24

EtienneCoumont opened this issue Feb 27, 2016 · 3 comments
Labels
Milestone

Comments

@EtienneCoumont
Copy link

I'm trying to render some html page that contains the following script :

<script>
    var d = document, s = d.createElement('script');
    s.src = 'dynamicload.js';
    (d.head || d.body).appendChild(s);
</script>

The resulting html is ok :
... <head><script src="dynamicload.js"></script></head> ...
But dynamicload.js does not seem to be loaded.

When I load directly the html <script src="dynamicload.js"></script>, everything works fine.

Am I missing something ?

@FlorianRappl
Copy link
Contributor

I think this is a potential problem in AngleSharp (I am not sure yet if this is already noticed and fixed in the upcoming version -- I will check this). The evaluation takes place too early and is therefore performed with the src attribute, i.e., nothing will be downloaded and executed.

@FlorianRappl FlorianRappl added this to the v0.4 milestone Feb 27, 2016
@FlorianRappl
Copy link
Contributor

I marked it as a bug here, but this is an AngleSharp issue. I will check before releasing the latest version there.

Marked for v0.4 since v0.4 will depend on this latest version of AngleSharp.

@FlorianRappl
Copy link
Contributor

I'll close it here and open it in AngleSharp itself. Otherwise, it is overlooked too easily.

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

No branches or pull requests

2 participants