diff options
Diffstat (limited to 'src/css/select.nim')
-rw-r--r-- | src/css/select.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/css/select.nim b/src/css/select.nim index f47df9af..0d142558 100644 --- a/src/css/select.nim +++ b/src/css/select.nim @@ -47,6 +47,9 @@ func pseudoSelectorMatches[T: Element|StyledNode](elem: T, sel: Selector, felem: elif elem.tagType == TAG_OPTION: return HTMLOptionElement(elem).selected return false + of PSEUDO_FOCUS: + when selem is StyledNode: felem.addDependency(selem, DEPEND_FOCUS) + return elem.document.focus == elem func selectorsMatch*[T: Element|StyledNode](elem: T, selectors: SelectorList, felem: T = nil): bool |