lib/phlex/html/void_elements.rb



# frozen_string_literal: true

# Void HTML elements don't accept content and never have a closing tag.
module Phlex::HTML::VoidElements
	extend Phlex::Elements

	# @!method area(**attributes, &content)
	# 	Outputs an `<area>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/area
	register_void_element :area

	# @!method br(**attributes, &content)
	# 	Outputs a `<br>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/br
	register_void_element :br

	# @!method col(**attributes, &content)
	# 	Outputs a `<col>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/col
	register_void_element :col

	# @!method embed(**attributes, &content)
	# 	Outputs an `<embed>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/embed
	register_void_element :embed

	# @!method hr(**attributes, &content)
	# 	Outputs an `<hr>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/hr
	register_void_element :hr

	# @!method img(**attributes, &content)
	# 	Outputs an `<img>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/img
	register_void_element :img

	# @!method input(**attributes, &content)
	# 	Outputs an `<input>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/input
	register_void_element :input

	# @!method link(**attributes, &content)
	# 	Outputs a `<link>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/link
	register_void_element :link

	# @!method meta(**attributes, &content)
	# 	Outputs a `<meta>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/meta
	register_void_element :meta

	# @!method source(**attributes, &content)
	# 	Outputs a `<source>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/source
	register_void_element :source

	# @!method track(**attributes, &content)
	# 	Outputs a `<track>` tag.
	# 	@return [nil]
	# 	@see https://developer.mozilla.org/docs/Web/HTML/Element/track
	register_void_element :track
end