function Elements::isHtml5Element
Test if an element is a valid html5 element.
Parameters
string $name The name of the element.:
Return value
bool true if a html5 element and false otherwise.
3 calls to Elements::isHtml5Element()
- DOMTreeBuilder::startTag in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ DOMTreeBuilder.php - Process the start tag.
- Elements::isElement in vendor/
masterminds/ html5/ src/ HTML5/ Elements.php - Is an element name valid in an html5 document. This includes html5 elements along with other allowed embedded content such as svg and mathml.
- Tokenizer::rcdata in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php - Read text in RCDATA mode.
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Elements.php, line 515
Class
- Elements
- This class provides general information about HTML5 elements, including syntactic and semantic issues. Parsers and serializers can use this class as a reference point for information about the rules of various HTML5 elements.
Namespace
Masterminds\HTML5Code
public static function isHtml5Element($name) {
// html5 element names are case insensitive. Forcing lowercase for the check.
// Do we need this check or will all data passed here already be lowercase?
return isset(static::$html5[strtolower($name)]);
}