Categorygithub.com/jum/htmlelements
modulepackage
1.0.2
Repository: https://github.com/jum/htmlelements.git
Documentation: pkg.go.dev

# README

htmlelements

A simple package to replicate the common JavaScript getElementByID and getElementsByClassName functionality for GO. See the documenation at https://pkg.go.dev/github.com/jum/htmlelements

# Functions

AddAttribute adds the named attribute, if the attribute is already present, the value will be appended with a blank as delimiter.
GetAttribute searches the named attribute, returning the value or if not found an empty string.
GetElementByID searches for the HTML element with the given id.
GetElementsByClassName searches the doc for all elements with the given class name.
GetElementsByTagName searches the doc for all elements with the given tag name.
InnerText retrieves all the text of all the elements concatenated.
RemoveAttribute removes the named attribute.