IFrameElement#

class toui.elements.IFrameElement(src=None, borderless=True)[source]#

Bases: Element

An <iframe> element edited to fit the content within it.

Parameters:
  • src (str) – The src attribute of the element.

  • borderless (bool, default = True) – If True, the border will be removed from the element.

Methods#

toui.elements.IFrameElement.add_content

Adds to the inner HTML content of the element.

toui.elements.IFrameElement.add_to_class_list

Adds the specified class to the HTML element if it does not exist.

toui.elements.IFrameElement.del_attr

Removes an HTML element attribute.

toui.elements.IFrameElement.from_bs4_tag

Converts a bs4.element.Tag object to an Element object.

toui.elements.IFrameElement.from_str

Converts HTML code to an Element object.

toui.elements.IFrameElement.get_attr

Gets the value of an HTML element attribute.

toui.elements.IFrameElement.get_class_list

Gets all classes of the HTML element as a list.

toui.elements.IFrameElement.get_content

Gets the inner HTML content of the element.

toui.elements.IFrameElement.get_element

Gets a child element from its id attribute.

toui.elements.IFrameElement.get_elements

Get children elements by their tag name and attributes.

toui.elements.IFrameElement.get_files

Gets uploaded files from element.

toui.elements.IFrameElement.get_height_property

Gets the value of the CSS property height inside the style attribute.

toui.elements.IFrameElement.get_id

Gets the id attribute of the HTML element.

toui.elements.IFrameElement.get_parent

Gets the parent element.

toui.elements.IFrameElement.get_selected

Gets the selected option of the HTML element <select>.

toui.elements.IFrameElement.get_selector

Gets the CSS selector of an element.

toui.elements.IFrameElement.get_style_property

Gets the value of a CSS property inside the style attribute.

toui.elements.IFrameElement.get_unique_selector

Gets the unique CSS selector of an element.

toui.elements.IFrameElement.get_value

Gets the value attribute of the HTML element.

toui.elements.IFrameElement.get_width_property

Gets the value of the CSS property width inside the style attribute.

toui.elements.IFrameElement.has_attr

Checks if the HTML element has the specified attribute.

toui.elements.IFrameElement.on

Creates an HTML event attribute and adds a Python function to it.

toui.elements.IFrameElement.onclick

Creates the HTML event attribute onclick and adds a Python function to it.

toui.elements.IFrameElement.remove_from_class_list

Removes all occurences of the specified class from the HTML element.

toui.elements.IFrameElement.set_attr

Sets the value of an HTML element attribute.

toui.elements.IFrameElement.set_content

Sets the inner HTML content of the element.

toui.elements.IFrameElement.set_height_property

Sets the value of the CSS property height inside the style attribute.

toui.elements.IFrameElement.set_id

Sets the value of the id attribute.

toui.elements.IFrameElement.set_style_property

Sets the value of a CSS property inside the style attribute.

toui.elements.IFrameElement.set_value

Sets the value of the value attribute.

toui.elements.IFrameElement.set_width_property

Sets the value of the CSS property width inside the style attribute.

toui.elements.IFrameElement.to_bs4_tag

Converts the Element object to a bs4.element.Tag object.

toui.elements.IFrameElement.to_str

Converts the Element object to HTML code.