OLD | NEW |
1 #include "bindings.ipp" | 1 #include "bindings.ipp" |
2 #include "Filter.h" | 2 #include "Filter.h" |
3 #include "InvalidFilter.h" | 3 #include "InvalidFilter.h" |
4 #include "CommentFilter.h" | 4 #include "CommentFilter.h" |
5 #include "ActiveFilter.h" | 5 #include "ActiveFilter.h" |
6 #include "RegExpFilter.h" | 6 #include "RegExpFilter.h" |
7 #include "BlockingFilter.h" | 7 #include "BlockingFilter.h" |
8 #include "WhitelistFilter.h" | 8 #include "WhitelistFilter.h" |
9 #include "ElemHideBase.h" | 9 #include "ElemHideBase.h" |
10 #include "ElemHideFilter.h" | 10 #include "ElemHideFilter.h" |
11 #include "ElemHideException.h" | 11 #include "ElemHideException.h" |
12 #include "CSSPropertyFilter.h" | 12 #include "ElemHideEmulationFilter.h" |
13 | 13 |
14 EMSCRIPTEN_BINDINGS | 14 EMSCRIPTEN_BINDINGS |
15 { | 15 { |
16 class_<Filter>("Filter") | 16 class_<Filter>("Filter") |
17 .property("text", &Filter::GetText) | 17 .property("text", &Filter::GetText) |
18 .function("serialize", &Filter::Serialize) | 18 .function("serialize", &Filter::Serialize) |
19 .class_function("fromText", &Filter::FromText) | 19 .class_function("fromText", &Filter::FromText) |
20 .subclass_differentiator(&Filter::mType, { | 20 .subclass_differentiator(&Filter::mType, { |
21 {Filter::Type::INVALID, "InvalidFilter"}, | 21 {Filter::Type::INVALID, "InvalidFilter"}, |
22 {Filter::Type::COMMENT, "CommentFilter"}, | 22 {Filter::Type::COMMENT, "CommentFilter"}, |
23 {Filter::Type::BLOCKING, "BlockingFilter"}, | 23 {Filter::Type::BLOCKING, "BlockingFilter"}, |
24 {Filter::Type::WHITELIST, "WhitelistFilter"}, | 24 {Filter::Type::WHITELIST, "WhitelistFilter"}, |
25 {Filter::Type::ELEMHIDE, "ElemHideFilter"}, | 25 {Filter::Type::ELEMHIDE, "ElemHideFilter"}, |
26 {Filter::Type::ELEMHIDEEXCEPTION, "ElemHideException"}, | 26 {Filter::Type::ELEMHIDEEXCEPTION, "ElemHideException"}, |
27 {Filter::Type::CSSPROPERTY, "CSSPropertyFilter"}, | 27 {Filter::Type::ELEMHIDEEMULATION, "ElemHideEmulationFilter"}, |
28 }); | 28 }); |
29 | 29 |
30 class_<InvalidFilter,Filter>("InvalidFilter") | 30 class_<InvalidFilter,Filter>("InvalidFilter") |
31 .class_property("type", "'invalid'") | 31 .class_property("type", "'invalid'") |
32 .property("reason", &InvalidFilter::GetReason); | 32 .property("reason", &InvalidFilter::GetReason); |
33 | 33 |
34 class_<CommentFilter,Filter>("CommentFilter") | 34 class_<CommentFilter,Filter>("CommentFilter") |
35 .class_property("type", "'comment'"); | 35 .class_property("type", "'comment'"); |
36 | 36 |
37 class_<ActiveFilter,Filter>("ActiveFilter") | 37 class_<ActiveFilter,Filter>("ActiveFilter") |
(...skipping 18 matching lines...) Expand all Loading... |
56 class_<ElemHideBase,ActiveFilter>("ElemHideBase") | 56 class_<ElemHideBase,ActiveFilter>("ElemHideBase") |
57 .property("selector", &ElemHideBase::GetSelector) | 57 .property("selector", &ElemHideBase::GetSelector) |
58 .property("selectorDomain", &ElemHideBase::GetSelectorDomain); | 58 .property("selectorDomain", &ElemHideBase::GetSelectorDomain); |
59 | 59 |
60 class_<ElemHideFilter,ElemHideBase>("ElemHideFilter") | 60 class_<ElemHideFilter,ElemHideBase>("ElemHideFilter") |
61 .class_property("type", "'elemhide'"); | 61 .class_property("type", "'elemhide'"); |
62 | 62 |
63 class_<ElemHideException,ElemHideBase>("ElemHideException") | 63 class_<ElemHideException,ElemHideBase>("ElemHideException") |
64 .class_property("type", "'elemhideexception'"); | 64 .class_property("type", "'elemhideexception'"); |
65 | 65 |
66 class_<CSSPropertyFilter,ElemHideBase>("CSSPropertyFilter") | 66 class_<ElemHideEmulationFilter,ElemHideBase>("ElemHideEmulationFilter") |
67 .class_property("type", "'cssproperty'") | 67 .class_property("type", "'elemhideemulation'"); |
68 .property("regexpString", &CSSPropertyFilter::GetRegExpString) | |
69 .property("selectorPrefix", &CSSPropertyFilter::GetSelectorPrefix) | |
70 .property("selectorSuffix", &CSSPropertyFilter::GetSelectorSuffix); | |
71 } | 68 } |
OLD | NEW |