You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you reporting to the correct repository? (there are multiple AngleSharp libraries, e.g., AngleSharp.Css for CSS support)
Did you perform a search in the issues?
Description
When setting up the BrowsingContext with the default resource loader and loading an HTML document it loads any link elements with stylesheets just fine. But when appending any new link elements to the document they do not get loaded as expected.
Steps to Reproduce
var config = Configuration.Default
.WithCss()
.WithDefaultLoader(new LoaderOptions() { IsResourceLoadingEnabled = true });
var html = @"<!doctype html><body></body>";
var document = BrowsingContext.New(config).OpenAsync(m => m.Content(html));
var link = document.CreateElement("link");
link.SetAttribute(AttributeNames.Rel, "stylesheet");
link.SetAttribute(AttributeNames.Href, "/mock-stylesheet.css");
document.Body.AppendChild(link);
Expected Behavior
The newly added link element's source should be loaded by the default resource loader (and in this case the CSS stylesheet should be parsed).
Actual Behavior
The link element is added to the document, but no request is made for the link's href URL.
Possible Solution / Known Workarounds
I have a PR ready for this with a fix.
The text was updated successfully, but these errors were encountered:
Prerequisites
AngleSharp.Css
for CSS support)Description
When setting up the BrowsingContext with the default resource loader and loading an HTML document it loads any
link
elements with stylesheets just fine. But when appending any newlink
elements to the document they do not get loaded as expected.Steps to Reproduce
Expected Behavior
The newly added link element's source should be loaded by the default resource loader (and in this case the CSS stylesheet should be parsed).
Actual Behavior
The link element is added to the document, but no request is made for the link's href URL.
Possible Solution / Known Workarounds
I have a PR ready for this with a fix.
The text was updated successfully, but these errors were encountered: