blob: 372e4afb50e94aaa4e833b35f882d57e4fa079d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "html.h"
#include "el_anchor.h"
#include "document.h"
litehtml::el_anchor::el_anchor(const std::shared_ptr<litehtml::document>& doc) : html_tag(doc)
{
}
void litehtml::el_anchor::on_click()
{
const char* href = get_attr("href");
if(href)
{
get_document()->container()->on_anchor_click(href, shared_from_this());
}
}
void litehtml::el_anchor::apply_stylesheet( const litehtml::css& stylesheet )
{
if( get_attr("href") )
{
m_pseudo_classes.push_back(_link_);
}
html_tag::apply_stylesheet(stylesheet);
}
|