HTML5 support for FluentDOM

2.0.0 2021-05-08 14:37 UTC

This package is auto-updated.

Last update: 2024-04-08 21:01:03 UTC


License CI Total Downloads Latest Stable Version Latest Unstable Version

Adds support for HTML5 to FluentDOM. It adds a loader and a serializer. It uses the HTML5-PHP library.


composer require fluentdom/html5


The loader registers automatically. You can trigger it with the types html5 and text/html5.

$document = FluentDOM::load($html5, 'text/html5');
$query = FluentDOM($html5, 'text/html5');


The serializer needs to be created with a document and can be cast into a string.

echo new FluentDOM\Html5\Serializer($document);

Casting a Nodes/Query instance to a string will use it if the content type matches:

$query = FluentDOM($html5, 'text/html5');
echo $query;