Documentation ¶
Overview ¶
Package domdbg implements helpers to debug a DOM tree.
______________________________________________________________________
License ¶
Governed by a 3-Clause BSD license. License file may be found in the root folder of this module.
Copyright © 2017–2021 Norbert Pillmayer <norbert@pillmayer.com>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dotty ¶
Dotty is a helper for testing. Given a DOM node and a testing.T, it will create a Graphiviz image of the DOM tree under `doc` and write it to a file in the current folder, choosing a unique file name. The image is in SVG format.
If an error occurs, t.Error(…) will be set, causing the test to fail.
func ToGraphViz ¶
ToGraphViz outputs a diagram for a DOM tree. The diagram is in GraphViz (DOT) format. Clients have to provide the root node of the DOM, a Writer, and an optional list of style parameter groups. The diagram will include all styles belonging to one of the parameter groups.
If the client does not provide a list of style groups, the following default will be used:
- Margins
- Padding
- Border
- Display
Types ¶
This section is empty.