6 litehtml::el_link::el_link(const std::shared_ptr
<document
>& doc
) : litehtml::html_tag(doc
)
11 void litehtml::el_link::parse_attributes()
13 bool processed
= false;
15 document::ptr doc
= get_document();
17 const char* rel
= get_attr("rel");
18 if(rel
&& !strcmp(rel
, "stylesheet"))
20 const char* media
= get_attr("media");
21 const char* href
= get_attr("href");
26 doc
->container()->import_css(css_text
, href
, css_baseurl
);
29 doc
->add_stylesheet(css_text
.c_str(), css_baseurl
.c_str(), media
);
37 doc
->container()->link(doc
, shared_from_this());