public final class PseudoElementValidator extends Object implements DependentPlugin
PseudoElementSelector
s are last within a selector sequence (the last SelectorPart
within a
Selector
).
"A selector is a chain of one or more sequences of simple selectors separated by combinators. One pseudo-element may be appended to the last sequence of simple selectors in a selector." (http://www.w3 .org/TR/css3-selectors/#selector-syntax).
Constructor and Description |
---|
PseudoElementValidator() |
Modifier and Type | Method and Description |
---|---|
void |
dependencies(PluginRegistry registry)
Registers plugin dependencies.
|
void |
validate(PseudoElementSelector selector,
ErrorManager em)
Validates that the pseudo element is always last, as according to the CSS spec.
|
public void dependencies(PluginRegistry registry)
DependentPlugin
Any plugins you add to the registry in this method will be ordered before this plugin itself.
Keep in mind that only one instance of a plugin can be added in a single parsing operation. You can use PluginRegistry.require(Class)
, PluginRegistry.require(Class, Supplier)
and PluginRegistry.retrieve(Class)
to assist in scenarios where a plugin instance may have already been added.
Dependencies to include can range from refinement dependencies such as SelectorPlugin
and MediaPlugin
to
other custom plugins.
dependencies
in interface DependentPlugin
registry
- The PluginRegistry
instance.PluginRegistry.require(Class)
,
PluginRegistry.require(Class, Supplier)
,
PluginRegistry.retrieve(Class)
public void validate(PseudoElementSelector selector, ErrorManager em)
selector
- The pseudo element.em
- The error manager.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.