🤖 autodocs

domonic

A library for creating html

domonic.html

Generate HTML using python.

domonic.html.Atag(self, *args: Any, **kwargs: Any) None[source]

Base class for the a tag

exception domonic.html.TemplateError(error: Exception, message: str = 'TemplateError: ')[source]
class domonic.html.a(*args: Any, **kwargs: Any)
class domonic.html.abbr(*args, **kwargs)
class domonic.html.address(*args, **kwargs)
class domonic.html.applet(*args, **kwargs)
class domonic.html.area(*args, href=None, target=None, alt=None, coords=None, shape=None, **kwargs)
class domonic.html.article(*args, **kwargs)
class domonic.html.aside(*args, **kwargs)
class domonic.html.audio(*args, autoplay: bool = None, controls=None, loop=None, muted=None, preload=None, src=None, **kwargs)
class domonic.html.b(*args, **kwargs)
class domonic.html.base(*args, href=None, target=None, **kwargs)
class domonic.html.basefont(*args, color=None, face=None, size=None, **kwargs)
class domonic.html.bdi(*args, **kwargs)
class domonic.html.bdo(*args, **kwargs)
class domonic.html.blockquote(*args, **kwargs)
class domonic.html.body(*args, aLink=None, background=None, bgColor=None, link=None, onload=None, onunload=None, text=None, vLink=None, **kwargs)
class domonic.html.br(*args, **kwargs)
class domonic.html.button(*args, disabled: bool = None, form=None, formaction: str = None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, name=None, type=None, value=None, **kwargs)
class domonic.html.canvas(*args, width: int = None, height: int = None, **kwargs)
class domonic.html.caption(*args, **kwargs)
class domonic.html.center(*args, **kwargs)
class domonic.html.cite(*args, **kwargs)
class domonic.html.closed_tag(*args, **kwargs)[source]
class domonic.html.code(*args, **kwargs)
class domonic.html.col(*args, **kwargs)
class domonic.html.colgroup(*args, **kwargs)
class domonic.html.command(*args, **kwargs)
class domonic.html.comment(data)
class domonic.html.content(*args, select=None, **kwargs)
domonic.html.create_element(name: str = 'custom_tag', *args: Any, **kwargs: Any) Element[source]

A method for creating custom tags

tag name needs to be set due to custom tags with hyphens can’t be classnames. i.e. hypenated tags <some-custom-tag></some-custom-tag>

class domonic.html.data(*args, value=None, **kwargs)
class domonic.html.datalist(*args, **kwargs)
class domonic.html.dd(*args, **kwargs)
class domonic.html.del_(*args, datetime=None, **kwargs)
class domonic.html.details(*args, **kwargs)
class domonic.html.dfn(*args, **kwargs)
class domonic.html.dialog(*args, open=None, **kwargs)
class domonic.html.dir(*args, **kwargs)
class domonic.html.div(*args, **kwargs)
class domonic.html.dl(*args, **kwargs)
class domonic.html.doctype(name: str = 'html', publicId: str = '', systemId: str = '')
class domonic.html.dt(*args, **kwargs)
class domonic.html.em(*args, **kwargs)
class domonic.html.embed(*args, **kwargs)
class domonic.html.fieldset(*args, disabled=None, form=None, name=None, **kwargs)
class domonic.html.figcaption(*args, **kwargs)
class domonic.html.figure(*args, **kwargs)
class domonic.html.font(*args, **kwargs)
class domonic.html.footer(*args, **kwargs)
class domonic.html.form(*args: Any, **kwargs: Any)[source]
class domonic.html.frame(*args, **kwargs)
class domonic.html.frameset(*args, cols=None, rows=None, **kwargs)
class domonic.html.h1(*args, **kwargs)
class domonic.html.h2(*args, **kwargs)
class domonic.html.h3(*args, **kwargs)
class domonic.html.h4(*args, **kwargs)
class domonic.html.h5(*args, **kwargs)
class domonic.html.h6(*args, **kwargs)
class domonic.html.head(*args, **kwargs)
class domonic.html.header(*args, **kwargs)
class domonic.html.hgroup(*args, **kwargs)
class domonic.html.hr(*args, **kwargs)
class domonic.html.html(*args, **kwargs)
class domonic.html.i(*args, **kwargs)
class domonic.html.iframe(*args, src=None, name=None, sandbox=None, allowfullscreen=None, **kwargs)
class domonic.html.img(*args, alt=None, src=None, crossorigin=None, height=None, ismap=None, longdesc=None, sizes=None, srcset=None, usemap=None, width=None, **kwargs)
class domonic.html.input(*args, accept=None, alt=None, autocomplete=None, autofocus=None, checked=None, dirname=None, disabled=None, form=None, formaction=None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, height=None, _list=None, _max=None, maxlength=None, _min=None, multiple=None, name=None, pattern=None, placeholder=None, readonly=None, required=None, size=None, src=None, step=None, type=None, value=None, width=None, **kwargs)
class domonic.html.ins(*args, **kwargs)
class domonic.html.isindex(*args, **kwargs)
class domonic.html.kbd(*args, **kwargs)
class domonic.html.keygen(*args, **kwargs)
class domonic.html.label(*args, **kwargs)
class domonic.html.legend(*args, **kwargs)
class domonic.html.li(*args, **kwargs)
class domonic.html.listing(*args, **kwargs)
class domonic.html.main(*args, **kwargs)
class domonic.html.map(*args, name=None, **kwargs)
class domonic.html.mark(*args, **kwargs)
class domonic.html.menu(*args, **kwargs)
class domonic.html.menuitem(*args, **kwargs)
class domonic.html.meta(*args, charset=None, content=None, http_equiv=None, name=None, **kwargs)
class domonic.html.meter(*args, value=None, _min=None, _max=None, low=None, high=None, optimum=None, **kwargs)
class domonic.html.mod(*args, datetime=None, **kwargs)
class domonic.html.nav(*args, **kwargs)
class domonic.html.noframes(*args, **kwargs)
class domonic.html.noscript(*args, **kwargs)
class domonic.html.object(*args, **kwargs)
class domonic.html.ol(*args, **kwargs)
class domonic.html.optgroup(*args, **kwargs)
class domonic.html.option(*args, disabled=None, label=None, selected=None, value=None, **kwargs)
class domonic.html.output(*args, **kwargs)
class domonic.html.p(*args, **kwargs)
class domonic.html.param(*args, name=None, value=None, **kwargs)
class domonic.html.picture(*args, **kwargs)
class domonic.html.plaintext(*args, **kwargs)
class domonic.html.portal(*args, **kwargs)
class domonic.html.pre(*args, **kwargs)
class domonic.html.progress(*args, value=None, max=None, **kwargs)
class domonic.html.q(*args, cite=None, **kwargs)
domonic.html.render(inp: Node, outp: str = '', to: str | None = None) str[source]

Render an HTML element or document to a string or file.

Parameters:
  • inp (obj) – A domonic tag. For example div()

  • outp (str) – An optional output filename

  • to (str) – An optional output type. if ‘pyml’ is specified then pyml is returned instead of html.

Returns:

The rendered HTML string (or PyML if specified).

Return type:

str

Examples

>>> div()
'<div></div>'
>>> render(div(), outp='output.html')
class domonic.html.rp(*args, **kwargs)
class domonic.html.rt(*args, **kwargs)
class domonic.html.ruby(*args, **kwargs)
class domonic.html.s(*args, **kwargs)
class domonic.html.samp(*args, **kwargs)
class domonic.html.script(*args, **kwargs)
class domonic.html.search(*args, **kwargs)
class domonic.html.section(*args, **kwargs)
class domonic.html.select(*args, autofocus: bool = None, disabled: bool = None, multiple: bool = None, name: str = None, required: bool = None, size: int = None, **kwargs)
class domonic.html.slot(*args, **kwargs)
class domonic.html.small(*args, **kwargs)
class domonic.html.source(*args, src=None, type=None, media=None, sizes=None, **kwargs)
class domonic.html.span(*args, **kwargs)
class domonic.html.strike(*args, **kwargs)
class domonic.html.strong(*args, **kwargs)
class domonic.html.style(*args, type=None, media=None, scoped=None, **kwargs)
class domonic.html.sub(*args, **kwargs)
class domonic.html.submit(*args, **kwargs)
class domonic.html.summary(*args, **kwargs)
class domonic.html.sup(*args, **kwargs)
class domonic.html.table(*args, align: str = None, bgcolor=None, border=None, cellpadding=None, cellspacing=None, frame=None, rules=None, summary=None, width=None, **kwargs)
class domonic.html.tbody(*args, **kwargs)
class domonic.html.td(*args, **kwargs)
class domonic.html.template(*args, **kwargs)
class domonic.html.textarea(*args, autofocus=None, cols=None, disabled=None, form=None, maxlength=None, name=None, placeholder=None, readonly=None, required=None, rows=None, wrap=None, **kwargs)
class domonic.html.tfoot(*args, **kwargs)
class domonic.html.th(*args, **kwargs)
class domonic.html.thead(*args, **kwargs)
class domonic.html.time(*args, datetime=None, **kwargs)
class domonic.html.title(*args, **kwargs)
class domonic.html.tr(*args, **kwargs)
class domonic.html.track(*args, kind=None, label=None, src=None, srclang=None, default=None, **kwargs)
class domonic.html.u(*args, **kwargs)
class domonic.html.ul(*args, **kwargs)
class domonic.html.var(*args, **kwargs)
class domonic.html.video(*args, autoplay=None, controls=None, height=None, loop=None, muted=None, poster=None, preload=None, src=None, width=None, **kwargs)
class domonic.html.wbr(*args, **kwargs)
class domonic.html.xmp(*args, **kwargs)

domonic.dom

The core DOM implementation for domonic.

This module provides the document tree, node and element types, collections, range and selection helpers, geometry interfaces, mutation and layout observers, and the document-facing APIs that the rest of the package builds on. It is intended to feel like a practical Python surface for the DOM and related web-platform concepts rather than a small HTML helper tree.

class domonic.dom.Attr(name: str, value='', *args, **kwargs)[source]
getNamedItem(name: str)[source]

Returns a specified attribute node from a NamedNodeMap

removeNamedItem(name: str) bool[source]

Removes a specified attribute node

setNamedItem(name: str, value) bool[source]

Sets the specified attribute node (by name)

class domonic.dom.CDATASection(data)[source]

The CDATASection interface represents a CDATA section that can be used within XML to include extended portions of unescaped text, such that the symbols < and & do not need escaping as they normally do within XML when used as text.

class domonic.dom.CaretPosition(offsetNode: Node | None = None, offset: int = 0)[source]

Represents a caret location as a node plus offset pair.

class domonic.dom.CharacterData(*args, **kwargs)[source]

The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren’t any objects of type CharacterData: it is implemented by other interfaces like Text, Comment, or ProcessingInstruction, which aren’t abstract.

after(newChild)

Inserts a newChild node immediately after this ChildNode.

appendData(data)[source]

Appends the given DOMString to the CharacterData.data string; when this method returns, data contains the concatenated DOMString.

before(newChild)

Inserts a newChild node immediately before this ChildNode.

deleteData(offset: int, count: int)[source]

Removes the specified amount of characters, starting at the specified offset, from the CharacterData.data string; when this method returns, data contains the shortened DOMString.

insertData(offset: int, data)[source]

Inserts the specified characters, at the specified offset, in the CharacterData.data string; when this method returns, data contains the modified DOMString.

property nextElementSibling: Node | None

Returns the next element at the same node tree level

property previousElementSibling: Node | None

returns the Element immediately prior to the specified one in its parent’s children list, or None if the specified element is the first one in the list.

remove()

Removes this ChildNode from the children list of its parent.

replaceData(offset: int, count: int, data)[source]

Replaces the specified amount of characters, starting at the specified offset, with the specified DOMString; when this method returns, data contains the modified DOMString.

replaceWith(newChild)

Replaces this ChildNode with a new one.

substringData(offset: int, length: int)[source]

Returns a DOMString containing the part of CharacterData.data of the specified length and starting at the specified offset.

class domonic.dom.ChildNode(*args, **kwargs)[source]

not tested yet

after(newChild)[source]

Inserts a newChild node immediately after this ChildNode.

before(newChild)[source]

Inserts a newChild node immediately before this ChildNode.

remove()[source]

Removes this ChildNode from the children list of its parent.

replaceWith(newChild)[source]

Replaces this ChildNode with a new one.

class domonic.dom.Comment(data)[source]
class domonic.dom.DOMConfig[source]

Global rendering and behaviour flags for domonic’s DOM.

DOMConfig controls how trees are rendered and how a few optional behaviours are interpreted across the library, such as auto-escaping text content and optional closing-tag handling.

exception domonic.dom.DOMException(code, message: str | None = None)[source]

The DOMException interface represents an anormal event related to the DOM.

class domonic.dom.DOMMatrix(*values: float)[source]

Mutable DOMMatrix implementation.

Use this when you want to construct, compose, invert, or transform points with a matrix that can be updated in place.

class domonic.dom.DOMMatrixReadOnly(*values: float)[source]

Read-only 4x4 transformation matrix for DOM geometry APIs.

Supports the common 2D aliases as well as the full 4x4 member set used by transforms, points, and animation/geometry helpers.

class domonic.dom.DOMPoint(x: float, y: float, z: float = 0, w: float = 1)[source]

The DOMPoint interface represents a point specified by x and y coordinates.

class domonic.dom.DOMPointReadOnly(x: float, y: float, z: float = 0, w: float = 1)[source]

The DOMPointReadOnly interface represents a point specified by x and y coordinates.

class domonic.dom.DOMQuad(p1: Any, p2: Any, p3: Any, p4: Any)[source]

The DOMQuad interface represents a quadrilateral on the plane with its four corners represented as Cartesian coordinates.

class domonic.dom.DOMRect(x: float = 0, y: float = 0, width: float = 0, height: float = 0)[source]

Mutable rectangle object for DOM geometry APIs.

class domonic.dom.DOMRectList(iterable=(), /)[source]

An ordered collection of DOMRect objects.

class domonic.dom.DOMRectReadOnly(x: float = 0, y: float = 0, width: float = 0, height: float = 0)[source]

Read-only rectangle object for DOM geometry APIs.

class domonic.dom.DOMStringMap(*args, **kwargs)[source]

Dictionary-like helper for element dataset values.

delete(name: str) bool[source]

Deletes the item with the specified name

get(name: str)[source]

Returns the value of the item with the specified name

set(name: str, value)[source]

Sets the value of the item with the specified name

class domonic.dom.DOMTimeStamp(value)[source]

The DOMTimeStamp interface represents a numeric value which represents the number of milliseconds since the epoch.

class domonic.dom.DOMTokenList(element: Node)[source]

DOMTokenList represents a set of space-separated tokens.

add(*args)[source]

Adds the given tokens to the list

contains(token) bool[source]

Returns true if the token is in the list, and false otherwise

item(index: int)[source]

Returns the token at the specified index

remove(*args)[source]

Removes the given tokens from the list

toString() str[source]

Returns a string containing all tokens in the list, with spaces separating each token

toggle(token, force=None)[source]

If force is not given, removes token from list if present, otherwise adds token to list. If force is true, adds token to list, and if force is false, removes token from list if present.

class domonic.dom.Document(*args, **kwargs)[source]

The Document interface represents the entire HTML or XML document.

property activeElement: Element | None

Returns the currently focused element, or the body/document element fallback.

property anchors

[get the anchors in the document]

property applets

Returns a collection of all <applet> elements in the document

property body

Returns the <body> element in the document

caretPositionFromPoint(x: float, y: float) CaretPosition | None[source]

Returns a CaretPosition for the closest element at the given coordinates.

property characterSet

Returns the character encoding for the document

property charset

Use characterSet instead.

Type:

Returns the character encoding for the document. Deprecated

close()[source]

Closes the output stream previously opened with document.open()

static createAttribute(name: str) Attr[source]

Creates an attribute node

static createCDATASection(data: str) CDATASection[source]

Creates a CDATASection node with the specified data

static createComment(message: str) Comment[source]

Creates a Comment node with the specified text

static createDocumentFragment(*args: Any) DocumentFragment[source]

Creates an empty DocumentFragment node if not content passed. I added args as optional to pass content

static createElement(_type: str, *args: Any, **kwargs: Any) Element[source]

Creates an Element node

static createElementNS(namespaceURI: str, qualifiedName: str, options: Any = None) Element[source]

Creates an element with the specified namespace URI and qualified name.

static createEntityReference(name: str) EntityReference[source]

Creates an EntityReference node with the specified name

static createEvent(event_type: str | None = None) Event[source]

[Creates a new event]

Parameters:

event_type ([type], optional) – [description]. Defaults to None.

Returns:

[a new event]

Return type:

[type]

static createExpression(xpath: str, nsResolver: Any) XPathExpression[source]

Creates an XPathExpression object for the given XPath string.

static createNodeIterator(root: Node, whatToShow: int | None = None, filter: Any = None) NodeIterator[source]

Creates a NodeIterator that can be used to traverse the document tree or subtree under root.

static createProcessingInstruction(target: str, data: str) ProcessingInstruction[source]

Creates a ProcessingInstruction node with the specified target and data

static createRange() Range[source]

Creates a Range

static createTextNode(text: str) Text[source]

[Creates a Text node with the specified text.

Parameters:

text ([str]) – [the text to be inserted]

Returns:

[a new Text node]

Return type:

[type]

static createTreeWalker(root: Node, whatToShow: int | None = None, filter: Any = None, entityReferenceExpansion: Any = None) TreeWalker[source]

[creates a TreeWalker object]

Parameters:
  • root ([type]) – [the root node at which to begin traversal]

  • whatToShow ([type], optional) – [what types of nodes to show]. Defaults to None.

  • filter ([type], optional) – [a NodeFilter or a function to be called for each node]. Defaults to None.

Returns:

[a new TreeWalker object]

Return type:

[type]

property doctype

Returns the Document Type Declaration associated with the document

domConfig()[source]

Returns the DOMConfig which has settings for how html content is rendered

domain()[source]

Returns the domain name of the server that loaded the document

elementFromPoint(x: float, y: float) Element | None[source]

Returns the topmost element at the specified coordinates.

elementsFromPoint(x: float, y: float) list[Element][source]

Returns an array of all elements at the specified coordinates.

property embeds

[Returns a collection of all <embed> elements the document]

Returns:

[a collection of all <embed> elements the document]

Return type:

[type]

evaluate(xpathExpression: str, contextNode: Node = None, namespaceResolver=None, resultType=7, result=None)[source]

Evaluates an XPath expression and returns the result.

property forms

Returns a collection of all <form> elements in the document

fullscreenElement()[source]

Returns the current element that is displayed in fullscreen mode

fullscreenEnabled()[source]

Returns a Boolean value indicating whether the document can be viewed in fullscreen mode

getElementById(_id: str) Element | None[source]

[Returns the element that has the ID attribute with the specified value]

Parameters:

_id ([str]) – [the value of the ID attribute]

Returns:

[the element that has the ID attribute with the specified value]

Return type:

[type]

getElementsByName(name: str)[source]

[Returns a NodeList containing all elements with a specified name]

Parameters:

name (str) – [the name to search for]

Returns:

[the matching elements]

Return type:

[type]

hasFocus() bool[source]

Returns True when the document currently tracks a focused element.

property head: HTMLHeadElement

Returns the <head> element of the document

property images

Returns a collection of all <img> elements in the document

property implementation

Returns the DOMImplementation object that handles this document

importNode(node, deep=False)[source]

Imports a node from another document to this document.

Returns a collection of all <a> and <area> elements in the document that have a href attribute

normalizeDocument()[source]

Removes empty Text nodes, and joins adjacent nodes

open(index='index.html')[source]

Opens an HTML output stream to collect output from document.write()

property pictureInPictureEnabled

Returns whether Picture-in-Picture mode is enabled.

renameNode(node, namespaceURI: str, nodename: str)[source]

[Renames the specified node, and returns the renamed node.]

Parameters:
  • node ([type]) – [the node to rename]

  • namespaceURI ([type]) – [a namespace URI]

  • nodename ([type]) – [a node name]

Returns:

[description]

Return type:

[type]

property scripts

[Returns a collection of <script> elements in the document]

Returns:

[a collection of <script> elements in the document]

Return type:

[type]

strictErrorChecking()[source]

Returns a Boolean value indicating whether to stop on the first error

property title: str

[gets the title of the document]

Returns:

The title of the document

Return type:

[str]

property visibilityState

Returns the visibility state of the document

write(html: str = '')[source]

[writes HTML text to a document

Parameters:

html (str, optional) – [the content to write to the document]

writeln(html: str = '')[source]

[writes HTML text to a document, followed by a line break]

Parameters:

html (str, optional) – [the content to write to the document]

property xmlversion

Returns the version of XML used for the document

class domonic.dom.DocumentFragment(*args: Any)[source]
property attributes: NamedNodeMap

Returns a NamedNodeMap of an element’s attributes

getElementById(_id: str) Element | None

[Returns the element that has the ID attribute with the specified value]

Parameters:

_id ([str]) – [the value of the ID attribute]

Returns:

[the element that has the ID attribute with the specified value]

Return type:

[type]

getElementsByTagName(tagName: str) HTMLCollection

[Returns a collection of all child elements with the specified tag name

Parameters:

tagName (str) – [a DOMString representing the tag name to match]

Returns:

[method returns a live HTMLCollection of elements with the given tag name.]

Return type:

[type]

querySelector(query: str) Element | None

[Returns the first child element that matches a specified CSS selector(s) of an element]

Parameters:

query (str) – [a CSS selector string]

Returns:

[an Element object]

Return type:

[type]

querySelectorAll(query: str) list[Element]

[Returns all child elements that matches a specified CSS selector(s) of an element]

Parameters:

query (str) – [a CSS selector string]

Returns:

[a list of Element objects]

Return type:

[type]

replaceChildren(newChildren: Iterable[Any]) None[source]

Replaces the childNodes of the DocumentFragment object.

class domonic.dom.DocumentTimeline(document: Document | None = None, originTime: float = 0.0)[source]

Document-associated timeline used by animation surfaces.

This is the timing source behind document.timeline and Element.animate(...).

class domonic.dom.DocumentType(name: str = 'html', publicId: str = '', systemId: str = '')[source]
internalSubset()[source]

A DOMString of the internal subset, or None. Eg “<!ELEMENT foo (bar)>”.

notations() NamedNodeMap[source]

A NamedNodeMap with notations declared in the DTD.

class domonic.dom.Element(*args, **kwargs)[source]

Baseclass for all html tags

append(*args)[source]

Inserts a set of Node objects or DOMString objects after the last child of the Element.

property attributes: NamedNodeMap

Returns a NamedNodeMap of an element’s attributes

blur()[source]

Removes focus from an element

caretPositionFromPoint(x: float, y: float) CaretPosition | None[source]

Returns a CaretPosition for the closest element within this subtree.

property classList

Returns the value of the classList attribute of an element

property className

Sets or returns the value of the className attribute of an element

click()[source]

Simulates a mouse-click on an element

property clientHeight

Returns the height of an element, including padding

property clientLeft

Returns the width of the left border of an element

property clientTop

Returns the width of the top border of an element

property clientWidth

Returns the width of an element, including padding

property contentEditable: bool

Sets or returns whether an element is editable

property dataset

Returns the value of the dataset attribute of an element

property dir

returns the value of the dir attribute of an element

elementFromPoint(x: float, y: float) Element | None[source]

Returns the topmost element in this subtree at the specified coordinates.

elementsFromPoint(x: float, y: float) list[Element][source]

Returns all elements in this subtree at the specified coordinates.

exitFullscreen()[source]

Cancels an element in fullscreen mode

firstElementChild()[source]

Returns the first child element of an element

focus()[source]

Sets focus on an element

getAttribute(attribute: str) str[source]

Returns the specified attribute value of an element node

getAttributeNS(namespaceURI, localName)[source]

Returns the value of the specified attribute

getAttributeNode(attribute: str) str[source]

Returns the specified attribute node

getAttributeNodeNS(attr)[source]

Sets the attribute node of an element

getBoundingClientRect()[source]

Returns the size of an element and its position relative to the viewport

getElementsByClassName(className: str) HTMLCollection[source]

[Returns a collection of all child elements with the specified class name]

Parameters:

className (str) – [a DOMString representing the class name to match]

Returns:

[a NodeList of all child elements with the specified class name]

Return type:

[type]

getElementsBySelector(all_selectors, document)[source]

Get DOM elements based on the given CSS Selector.

Original sources: - https://simonwillison.net/2003/Mar/25/getElementsBySelector/ - http://www.openjs.com/scripts/dom/css_selector/ - https://bin-co.com/python/scripts/getelementsbyselector-html-css-query.php (ported to Python 2, broken/bugs, BSD licensed)

Note: - Always include a tag in the query. For example, ‘a.classname’ will work, but just ‘.classname’ will not. - Preserved as a compatibility helper for older selector-style code. - TODO: Needs to work in conjunction with _matchElement for better querySelector support, and to ensure dQuery compatibility. - TODO: Implement support for *= (node content).

Parameters:
  • all_selectors (str) – The CSS selectors to query.

  • document (object) – The document object to search within.

Returns:

A list of elements matching the CSS selectors.

Return type:

list

getElementsByTagName(tagName: str) HTMLCollection[source]

[Returns a collection of all child elements with the specified tag name

Parameters:

tagName (str) – [a DOMString representing the tag name to match]

Returns:

[method returns a live HTMLCollection of elements with the given tag name.]

Return type:

[type]

getSelection()[source]

Returns a Selection object for this element’s root tree.

hasAttribute(attribute: str) bool[source]

Returns True if an element has the specified attribute, otherwise False

Parameters:

attribute (str) – [the attribute to test for]

Returns:

[True if an element has the specified attribute, otherwise False]

Return type:

bool

hasAttributes() bool[source]

Returns true if an element has any attributes, otherwise false

property id: str | None

Sets or returns the value of the id attribute of an element

property innerHTML

Sets or returns the content of an element

insertAdjacentElement(position: str, element: Element) Element | None[source]

Inserts an element adjacent to the current element.

insertAdjacentHTML(position: str, html: str) None[source]

Inserts raw HTML adjacent to the current element

insertAdjacentText(position: str, text: str) None[source]

Inserts text adjacent to the current element

isContentEditable() bool[source]

Returns true if the content of an element is editable, otherwise false

lastElementChild() Node | None[source]

[Returns the last child element of an element]

Returns:

[the last child element of an element]

Return type:

[type]

matches(s: str) bool[source]

[checks to see if the Element would be selected by the provided selectorString]

https://developer.mozilla.org/en-US/docs/Web/API/Element/matches

Parameters:

s (str) – [css selector]

Returns:

[True if selector maches Element otherwise False]

Return type:

[bool]

namespaceURI() str[source]

Returns the namespace URI of an element

property nextElementSibling: Node | None

Returns the next element at the same node tree level

property nextSibling: Node | None

Returns the next node at the same node tree level

normalize() list[Any][source]

Joins adjacent text nodes and removes empty text nodes in an element

offsetHeight() float[source]

Returns the height of an element, including padding, border and scrollbar

offsetLeft() float[source]

Returns the horizontal offset position of an element

offsetParent() Node | None[source]

Returns the offset container of an element

offsetTop() float[source]

Returns the vertical offset position of an element

offsetWidth() float[source]

Returns the width of an element, including padding, border and scrollbar

property parentElement: Node | None

Returns the parent element node of an element

prepend(*args: Any) None[source]

Prepends a node to the current element

property previousElementSibling: Node | None

returns the Element immediately prior to the specified one in its parent’s children list, or None if the specified element is the first one in the list.

querySelector(query: str) Element | None[source]

[Returns the first child element that matches a specified CSS selector(s) of an element]

Parameters:

query (str) – [a CSS selector string]

Returns:

[an Element object]

Return type:

[type]

querySelectorAll(query: str) list[Element][source]

[Returns all child elements that matches a specified CSS selector(s) of an element]

Parameters:

query (str) – [a CSS selector string]

Returns:

[a list of Element objects]

Return type:

[type]

remove()[source]

Removes the element from the DOM

removeAttribute(attribute: str)[source]

Removes a specified attribute from an element

removeAttributeNS(namespaceURI, localName)[source]

Removes an attribute from an element

removeAttributeNode(attribute)[source]

Removes a specified attribute node, and returns the removed node

requestFullscreen()[source]

Shows an element in fullscreen mode

scrollHeight()[source]

Returns the entire height of an element, including padding

scrollIntoView()[source]

Scrolls the specified element into the visible area of the browser window

scrollLeft()[source]

Sets or returns the number of pixels an element’s content is scrolled horizontally

scrollTop()[source]

Sets or returns the number of pixels an element’s content is scrolled vertically

scrollWidth()[source]

Returns the entire width of an element, including padding

setAttribute(attribute, value)[source]

Sets or changes the specified attribute, to the specified value

setAttributeNS(namespaceURI, localName, value)[source]

Sets an attribute in the given namespace

setAttributeNode(attr)[source]

[Sets or changes the specified attribute node]

Parameters:

attr ([type]) – [an Attr object]

setAttributeNodeNS(attr)[source]

Sets the attribute node of an element

property style

returns the value of the style attribute of an element

property title

returns the value of the title attribute of an element

toString() str[source]

Converts an element to a string

class domonic.dom.Entity(*args)[source]
static fromChar(char: str) str[source]

Returns the character corresponding to the given entity name.

static fromName(entityName: str) str[source]

Returns the entity name corresponding to the given character.

class domonic.dom.EntityReference(*args)[source]

The EntityReference interface represents a reference to an entity, either parsed or unparsed, in an Entity Node. Note that this is not a CharacterData node, and does not have any child nodes.

static fromOrdinal(ordinal: int)[source]

Returns the entity name corresponding to the given character.

static ordinal(entityName: str)[source]

Returns the character corresponding to the given entity name.

class domonic.dom.HTMLAnchorElement(*args, href=None, target=None, rel=None, download=None, type=None, **kwargs)[source]
class domonic.dom.HTMLAreaElement(*args, href=None, target=None, alt=None, coords=None, shape=None, **kwargs)[source]
class domonic.dom.HTMLAudioElement(*args, autoplay: bool = None, controls=None, loop=None, muted=None, preload=None, src=None, **kwargs)[source]
class domonic.dom.HTMLBRElement(*args, **kwargs)[source]
class domonic.dom.HTMLBaseElement(*args, href=None, target=None, **kwargs)[source]
class domonic.dom.HTMLBaseFontElement(*args, color=None, face=None, size=None, **kwargs)[source]
class domonic.dom.HTMLBodyElement(*args, aLink=None, background=None, bgColor=None, link=None, onload=None, onunload=None, text=None, vLink=None, **kwargs)[source]
class domonic.dom.HTMLButtonElement(*args, disabled: bool = None, form=None, formaction: str = None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, name=None, type=None, value=None, **kwargs)[source]
click()[source]

Simulates a mouse-click on an element

class domonic.dom.HTMLCanvasElement(*args, width: int = None, height: int = None, **kwargs)[source]
class domonic.dom.HTMLCollection(iterable=(), /)[source]
item(index: int) Node | None[source]

[gets the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.]

Parameters:

index ([type]) – [the index of the item to return.]

Returns:

[the node at the indexth position, or None]

Return type:

[type]

namedItem(name: str) Node | None[source]

Returns the specific node whose ID or, as a fallback, name matches the string specified by name.

class domonic.dom.HTMLContentElement(*args, select=None, **kwargs)[source]
class domonic.dom.HTMLDListElement(*args, **kwargs)[source]
class domonic.dom.HTMLDataElement(*args, value=None, **kwargs)[source]
class domonic.dom.HTMLDataListElement(*args, **kwargs)[source]
class domonic.dom.HTMLDetailsElement(*args, open: bool = None, **kwargs)[source]
class domonic.dom.HTMLDialogElement(*args, open=None, **kwargs)[source]
class domonic.dom.HTMLDivElement(*args, **kwargs)[source]
class domonic.dom.HTMLDocument(*args, **kwargs)[source]
class domonic.dom.HTMLElement(*args, **kwargs)[source]
class domonic.dom.HTMLEmbedElement(*args, **kwargs)[source]
class domonic.dom.HTMLFieldSetElement(*args, disabled=None, form=None, name=None, **kwargs)[source]
class domonic.dom.HTMLFormControlsCollection(form: HTMLFormElement)[source]

Live collection of a form’s listed controls.

item(index: int) HTMLElement | None[source]

[gets the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.]

Parameters:

index ([type]) – [the index of the item to return.]

Returns:

[the node at the indexth position, or None]

Return type:

[type]

namedItem(name: str) HTMLElement | None[source]

Returns the specific node whose ID or, as a fallback, name matches the string specified by name.

class domonic.dom.HTMLFormElement(*args, action: str = None, autocomplete=None, enctype: str = None, method: str = None, name: str = None, novalidate: bool = None, target=None, **kwargs)[source]
class domonic.dom.HTMLFrameSetElement(*args, cols=None, rows=None, **kwargs)[source]
class domonic.dom.HTMLHRElement(*args, **kwargs)[source]
class domonic.dom.HTMLHeadElement(*args, **kwargs)[source]
class domonic.dom.HTMLHeadingElement(*args, **kwargs)[source]
class domonic.dom.HTMLIFrameElement(*args, src=None, name=None, sandbox=None, allowfullscreen=None, **kwargs)[source]
class domonic.dom.HTMLImageElement(*args, alt=None, src=None, crossorigin=None, height=None, ismap=None, longdesc=None, sizes=None, srcset=None, usemap=None, width=None, **kwargs)[source]
class domonic.dom.HTMLInputElement(*args, accept=None, alt=None, autocomplete=None, autofocus=None, checked=None, dirname=None, disabled=None, form=None, formaction=None, formenctype=None, formmethod=None, formnovalidate=None, formtarget=None, height=None, _list=None, _max=None, maxlength=None, _min=None, multiple=None, name=None, pattern=None, placeholder=None, readonly=None, required=None, size=None, src=None, step=None, type=None, value=None, width=None, **kwargs)[source]
click()[source]

Simulates a mouse-click on an element

class domonic.dom.HTMLIsIndexElement(*args, prompt=None, **kwargs)[source]
class domonic.dom.HTMLKeygenElement(*args, **kwargs)[source]
class domonic.dom.HTMLLIElement(*args, **kwargs)[source]
class domonic.dom.HTMLLabelElement(*args, **kwargs)[source]
class domonic.dom.HTMLLegendElement(*args, **kwargs)[source]
class domonic.dom.HTMLLinkElement(*args, rel=None, href=None, type=None, sizes=None, **kwargs)[source]
class domonic.dom.HTMLMapElement(*args, name=None, **kwargs)[source]
class domonic.dom.HTMLMediaElement(*args, src=None, crossorigin=None, preload=None, autoplay=None, loop=None, muted=None, controls=None, **kwargs)[source]
class domonic.dom.HTMLMetaElement(*args, charset=None, content=None, http_equiv=None, name=None, **kwargs)[source]
class domonic.dom.HTMLMeterElement(*args, value=None, _min=None, _max=None, low=None, high=None, optimum=None, **kwargs)[source]
class domonic.dom.HTMLModElement(*args, datetime=None, **kwargs)[source]
class domonic.dom.HTMLOListElement(*args, **kwargs)[source]
class domonic.dom.HTMLObjectElement(*args, **kwargs)[source]
class domonic.dom.HTMLOptGroupElement(*args, **kwargs)[source]
class domonic.dom.HTMLOptionElement(*args, disabled=None, label=None, selected=None, value=None, **kwargs)[source]
class domonic.dom.HTMLOptionsCollection(select: HTMLSelectElement)[source]

Live collection of a select element’s option descendants.

item(index: int) HTMLOptionElement | None[source]

[gets the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.]

Parameters:

index ([type]) – [the index of the item to return.]

Returns:

[the node at the indexth position, or None]

Return type:

[type]

namedItem(name: str) HTMLOptionElement | None[source]

Returns the specific node whose ID or, as a fallback, name matches the string specified by name.

remove(index: int) None[source]

Remove first occurrence of value.

Raises ValueError if the value is not present.

class domonic.dom.HTMLOutputElement(*args, **kwargs)[source]
class domonic.dom.HTMLParagraphElement(*args, **kwargs)[source]
class domonic.dom.HTMLParamElement(*args, name=None, value=None, **kwargs)[source]
class domonic.dom.HTMLPictureElement(*args, **kwargs)[source]
class domonic.dom.HTMLPortalElement(*args, **kwargs)[source]
class domonic.dom.HTMLPreElement(*args, **kwargs)[source]
class domonic.dom.HTMLProgressElement(*args, value=None, max=None, **kwargs)[source]
class domonic.dom.HTMLQuoteElement(*args, cite=None, **kwargs)[source]
class domonic.dom.HTMLScriptElement(*args, **kwargs)[source]
class domonic.dom.HTMLSelectElement(*args, autofocus: bool = None, disabled: bool = None, multiple: bool = None, name: str = None, required: bool = None, size: int = None, **kwargs)[source]
class domonic.dom.HTMLShadowElement(*args, **kwargs)[source]
class domonic.dom.HTMLSlotElement(*args, **kwargs)[source]
class domonic.dom.HTMLSourceElement(*args, src=None, type=None, media=None, sizes=None, **kwargs)[source]
class domonic.dom.HTMLSpanElement(*args, **kwargs)[source]
class domonic.dom.HTMLStyleElement(*args, type=None, media=None, scoped=None, **kwargs)[source]
class domonic.dom.HTMLSummaryElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableCaptionElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableCellElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableColElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableDataCellElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableElement(*args, align: str = None, bgcolor=None, border=None, cellpadding=None, cellspacing=None, frame=None, rules=None, summary=None, width=None, **kwargs)[source]
class domonic.dom.HTMLTableHeaderCellElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableRowElement(*args, **kwargs)[source]
class domonic.dom.HTMLTableSectionElement(*args, **kwargs)[source]
class domonic.dom.HTMLTemplateElement(*args, **kwargs)[source]
class domonic.dom.HTMLTextAreaElement(*args, autofocus=None, cols=None, disabled=None, form=None, maxlength=None, name=None, placeholder=None, readonly=None, required=None, rows=None, wrap=None, **kwargs)[source]
class domonic.dom.HTMLTimeElement(*args, datetime=None, **kwargs)[source]
class domonic.dom.HTMLTitleElement(*args, **kwargs)[source]
class domonic.dom.HTMLTrackElement(*args, kind=None, label=None, src=None, srclang=None, default=None, **kwargs)[source]
class domonic.dom.HTMLUListElement(*args, **kwargs)[source]
class domonic.dom.HTMLUnknownElement(*args, **kwargs)[source]
class domonic.dom.HTMLVideoElement(*args, autoplay=None, controls=None, height=None, loop=None, muted=None, poster=None, preload=None, src=None, width=None, **kwargs)[source]
class domonic.dom.IntersectionObserver(callback: Callable[[list[IntersectionObserverEntry], IntersectionObserver], Any], options: dict[str, Any] | None = None)[source]

Observe whether elements intersect a root rectangle or viewport-like area.

Domonic models intersections using element bounding boxes and a root rectangle, which is enough for practical DOM-side visibility checks and tests.

class domonic.dom.IntersectionObserverEntry(target: Element, rootBounds: DOMRectReadOnly, boundingClientRect: DOMRectReadOnly, intersectionRect: DOMRectReadOnly, time_value: float)[source]

Visibility snapshot for one target observed by IntersectionObserver.

class domonic.dom.MutationObserver(callback: Callable[[list[MutationRecord], MutationObserver], Any])[source]

Observe DOM tree mutations and receive MutationRecord batches.

This implementation follows the familiar platform model: call observe() with a target and options, allow DOM operations to queue records, then receive them through the callback or takeRecords().

class domonic.dom.MutationRecord(type: str, target: Node, *, addedNodes: Iterable[Node] = (), removedNodes: Iterable[Node] = (), previousSibling: Node | None = None, nextSibling: Node | None = None, attributeName: str | None = None, attributeNamespace: str | None = None, oldValue: str | None = None)[source]

Single mutation payload delivered to a MutationObserver.

Records describe one child-list, attribute, or character-data change and carry the pieces of context the observer asked to receive.

class domonic.dom.NamedNodeMap(args: Iterable[Attr] | None = None, ownerDocument=None, parentNode=None)[source]

Live attribute collection exposed by Element.attributes.

NamedNodeMap behaves like the DOM interface rather than a plain Python dict: it is ordered, can be accessed by index or attribute name, and stays in sync with the owning element’s current attributes.

class domonic.dom.Node(*args, **kwargs)[source]

An abstract base class upon which many other DOM API objects are based

appendChild(aChild: Node) Node[source]

Adds a child to the current element. If item is a DocumentFragment, all its children are added.

Parameters:

item (Node) – The Node to add.

property attrib

Returns the attributes of the current node as a dict not a NamedNodeMap

property childElementCount: int

Returns the number of child elements an element has

property childNodes: NodeList

Returns a live NodeList containing all the children of this node

property children: list[Node]

Returns a collection of an element’s child element (excluding text and comment nodes)

cloneNode(deep: bool = True)[source]

Returns a copy.

compareDocumentPosition(otherElement: Node) int[source]

An integer value representing otherNode’s position relative to node as a bitmask combining the following constant properties of Node:

https://stackoverflow.com/questions/8334286/cross-browser-compare-document-position

contains(node: Node) bool[source]

Check whether a node is a descendant of a given node

property firstChild: Node | None

Returns the first child node of an element

hasChildNodes() bool[source]

Returns true if an element has any child nodes, otherwise false

insertBefore(new_node: Node, reference_node: Node | None = None) Node[source]

inserts a node before a reference node as a child of a specified parent node. this will remove the node from its previous parent node, if any.

# TODO - can throw value error if wrong ordered params. may be helpful to catch to say so.

isDefaultNamespace(ns)[source]

Checks if a namespace is the default namespace

isEqualNode(node)[source]

Checks if two elements are equal

isSameNode(node)[source]

Checks if two elements are the same node

is_matching(name, default_namespace=None)[source]

Determine if this node matches the given name and namespace.

iter(tag=None)[source]

Creates a tree iterator with the current element as the root. The iterator iterates over this element and all elements below it, in document (depth first) order. If tag is not None or ‘*’, only elements whose tag equals tag are returned from the iterator. If the tree structure is modified during iteration, the result is undefined.

property lastChild: Node | None

Returns the last child node of an element

lookupNamespaceURI(ns: str)[source]

Returns the namespace URI for a given prefix

Parameters:

ns – prefix - i.e ‘xml’, ‘xlink’, ‘svg’, etc

lookupPrefix(ns)[source]

Returns the prefix for a given namespace URI

property nextSibling

[returns the next sibling of the current node.]

property nodeName: str | None

Returns the name of a node

property nodeValue: str | None

Sets or returns the value of a node

normalize()[source]

Normalize a node’s value

property ownerDocument: Node | None

Returns the root element (document object) for an element

property previousSibling

[returns the previous sibling of the current node.]

removeChild(node: Node) Node | None[source]

removes a child node from the DOM and returns the removed node.

replaceChild(newChild: Node, oldChild: Node) Node[source]

[Replaces a child node within the given (parent) node.]

Parameters:
  • newChild ([type]) – [a Node object]

  • oldChild ([type]) – [a Node object]

Returns:

[the old child node]

Return type:

[type]

property rootNode: Node

[read-only property returns a Node object representing the topmost node in the tree, or the current node if it’s the topmost node in the tree]

Returns:

[the topmost Node in the tree]

Return type:

[Node]

property tag

Returns the tag name of the current node

property tail

Returns the text content of the current node

property text

Returns the text content of the current node

property textContent

Returns the text content of a node and its descendants

class domonic.dom.NodeIterator(root: Node, whatToShow: int = 4294967295, filter: Any = None, entityReferenceExpansion: bool = False)[source]

[NodeIterator is an iterator object that iterates over the descendants of a node, in tree order.]

nextNode() Node | None[source]

Returns the next Node in the document, or null if there are none.

pointerBeforeReferenceNode() bool[source]

Returns a boolean flag that indicates whether the NodeIterator is anchored before, the flag being true, or after, the flag being false, the anchor node.

previousNode() Node | None[source]

Returns the previous Node in the document, or null if there are none.

referenceNode() Node[source]

Returns the Node that is being iterated over.

class domonic.dom.NodeList(iterable=(), /)[source]

NodeList objects are collections of nodes

entries() Iterable[tuple[int, Node]][source]

Returns an iterator, allowing code to go through all key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0 and the values are nodes.

forEach(func: Callable[[Node, int, NodeList], Any], thisArg: Any = None) None[source]

Calls a function for each item in the NodeList.

item(index: int) Node | None[source]

Returns an item in the list by its index, or null if the index is out-of-bounds.

keys() Iterable[int][source]

Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0.)

values() Iterable[Node][source]

Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.

class domonic.dom.ParentNode(*args, **kwargs)[source]

not tested yet

property children: NodeList

Return list of child nodes.

property firstElementChild

First Element child node.

property lastElementChild

Last Element child node.

class domonic.dom.ProcessingInstruction(target, data)[source]
class domonic.dom.RadioNodeList(name: str)[source]
property value: Any

Returns the value of the first element in the collection, or null if there are no elements in the collection.

class domonic.dom.ResizeObserver(callback: Callable[[list[ResizeObserverEntry], ResizeObserver], Any])[source]

Observe element box changes through DOM geometry reads.

Domonic treats layout changes pragmatically: when relevant geometry changes are computed, resize entries are queued and delivered to the callback.

class domonic.dom.ResizeObserverEntry(target: Element, contentRect: DOMRectReadOnly)[source]

Geometry snapshot for a single observed element resize.

class domonic.dom.ResizeObserverSize(inlineSize: float, blockSize: float)[source]

Inline and block dimensions reported by ResizeObserver entries.

class domonic.dom.Selection[source]

Represents the user’s current selection within a document or shadow tree.

Domonic keeps both ordered Range data and anchor/focus information so selection direction can still be represented.

class domonic.dom.ShadowRoot(host, mode='open')[source]

property on element that has hidden DOM

caretPositionFromPoint(x: float = 0, y: float = 0) CaretPosition | None[source]

Returns a CaretPosition object containing the DOM node containing the caret, and caret’s character offset within that node.

elementFromPoint(x: float, y: float) Element | None[source]

Returns the topmost element at the specified coordinates.

elementsFromPoint(x: float, y: float) list[Element][source]

Returns an array of all elements at the specified coordinates.

getSelection() Selection[source]

Returns a Selection object for the document.

class domonic.dom.StaticRange(startContainer, startOffset, endContainer, endOffset)[source]

Immutable snapshot of a range boundary pair.

StaticRange mirrors the platform idea of a range-like object that can be inspected and cloned back into a mutable Range but cannot be edited in place.

class domonic.dom.Text(*args, **kwargs)[source]

Text Node

property assignedSlot

Returns the slot whose assignedNodes contains this node.

property childNodes

Returns a live NodeList containing all the children of this node

property firstChild

Returns the first child node of an element

property nodeName

Returns the name of a node

splitText(offset: int)[source]

Splits the Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. The first node is returned, while the second node is discarded and exists outside the tree.

property wholeText

Returns a DOMString containing all the text content of the node and its descendants.

class domonic.dom.TreeWalker(node: Node, whatToShow: int = 4294967295, _filter: Any = None, expandEntityReferences: bool = False)[source]

The TreeWalker object represents the nodes of a document subtree and a position within them.

firstChild() Node | None[source]

Moves the current Node to the first visible child of the current node, and returns the found child. It also moves the current node to this child. If no such child exists, returns null and the current node is not changed.

lastChild() Node | None[source]

Moves the current Node to the last visible child of the current node, and returns the found child. It also moves the current node to this child. If no such child exists, null is returned and the current node is not changed.

nextNode()[source]

Moves the current Node to the next visible node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, returns None and the current node is not changed. can be used in a while loop to iterate over all the nodes in the document order.

nextSibling() Node | None[source]

Moves the current Node to its next sibling, if any, and returns the found sibling. If there is no such node, null is returned and the current node is not changed.

parentNode() Node | None[source]

Moves the current Node to the first visible ancestor node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.

previousNode()[source]

Moves the current Node to the previous visible node in the document order, and returns the found node. It also moves the current node to this one. If no such node exists, or if it is before that the root node defined at the object construction, returns null and the current node is not changed.

previousSibling() Node | None[source]

Moves the current Node to its previous sibling, if any, and returns the found sibling. If there is no such node, return null and the current node is not changed.

property root: Node

Returns a Node representing the root node as specified when the TreeWalker was created.

tree

Is a boolean value indicating, when discarding an entity reference its whole sub-tree must be discarded at the same time.

whatToShow(options: int) int[source]

Returns an unsigned long being a bitmask made of constants describing the types of Node that must be presented. Non-matching nodes are skipped, but their children may be included, if relevant. The possible values are:

class domonic.dom.XMLDocument(*args, **kwargs)[source]
domonic.dom.console

# self.screen = type(‘screen’, (DOM,), {‘name’:’screen’})

class domonic.javascript.Array(*args: Any)[source]

javascript array

at(index: int) Any[source]

[takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.]

Parameters:

index ([type]) – [position of item]

Returns:

[item at the given position]

Return type:

[type]

concat(*args: list[Any]) list[Any][source]

[Joins two or more arrays, and returns a copy of the joined arrays]

Returns:

[returns a copy of the joined arrays]

Return type:

[list]

copyWithin(target: Sequence[Any], start: int = 0, end: int | None = None) None[source]

Copies array elements within the array, from start to end

entries() Iterator[list[Any]][source]

[Returns a key/value pair Array Iteration Object]

Yields:

[type] – [key/value pair]

every(func: Callable[[Any], bool]) bool[source]

[Checks if every element in an array pass a test]

Parameters:

func ([type]) – [test function]

Returns:

[if every array elemnt passed the test]

Return type:

[bool]

fill(value: Any = None, start: int | None = None, end: int | None = None) list[Any][source]

[Fills elements of an array from a start index to an end index with a static value]

filter(func: Callable[[Any], bool]) list[Any][source]

Creates a new array with every element in an array that pass a test i.e. even_numbers = someArr.filter( lambda x: x % 2 == 0 )

find(func: Callable[[Any], bool]) Any[source]

Returns the value of the first element in an array that pass a test

findIndex(value: Any) int[source]

Returns the index of the first element in an array that pass a test

findLast(callback: Callable[[Any, int, list[Any]], bool]) Any[source]

[Returns the last element in an array that passes a test]

findLastIndex(callback: Callable[[Any, int, list[Any]], bool]) int[source]

[Returns the last index of an element in an array that passes a test]

flat(depth: int = 1) list[Any][source]

[Flattens an array into a single-dimensional array or a depth of arrays]

flatMap(fn: Callable[[Any], Any]) Array[source]

[Maps a function over an array and flattens the result]

forEach(func: Callable[[Any], Any]) None[source]

Calls a function for each array element

static from_(obj: Any) Array[source]

Creates a new Array instance from an array-like or iterable object.

groupBy(callback) dict[source]

[Groups the elements of an array according to the result of calling a callback function on each element]

Parameters:

callback (callable) – [the callback recieves the following paramters(value, index, target)]

Returns:

[a dictionary of arrays]

Return type:

[dict]

includes(value: Any) bool[source]

[Check if an array contains the specified item

Parameters:

value ([any]) – [any value]

Returns:

[a boolean]

Return type:

[bool]

indexOf(value: Any) int[source]

Search the array for an element and returns its position

static isArray(thing: Any) bool[source]

[Checks whether an object is an array]

Parameters:

thing ([type]) – [thing to check]

Returns:

[True if the object is list, tuple or Array]

Return type:

[bool]

join(value: str) str[source]

Joins all elements of an array into a string

keys() Iterator[Any][source]

Returns a Array Iteration Object, containing the keys of the original array

lastIndexOf(value: Any) int | None[source]

Search the array for an element, starting at the end, and returns its position

property length: int

Sets or returns the number of elements in an array

map(func: Callable[[Any], Any]) list[Any][source]

[Creates a new array with the result of calling a function for each array element]

Parameters:

func ([type]) – [a function to call on each array element]

Returns:

[a new array]

Return type:

[list]

static of(*args: Any) Array[source]

Creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments.

pop() Any[source]

Removes the last element of an array, and returns that element

prototype

alias of Array

push(value: Any) int[source]

Adds new elements to the end of an array, and returns the new length

reduce(callback: Callable[[...], Any], initialValue: Any = None) Any[source]

Reduces the array to a single value (going left-to-right) callback recieve theses parameters: previousValue, currentValue, currentIndex, array

reduceRight(callback: Callable[[...], Any], initialValue: Any = None) Any[source]

Reduces the array to a single value (going right-to-left) callback recieve theses parameters: previousValue, currentValue, currentIndex, array

reverse() list[Any][source]

Reverses the order of the elements in an array

shift() Any[source]

[removes the first element from an array and returns that removed element]

Returns:

[the removed array element]

Return type:

[type]

slice(start: int = 0, stop: int | None = None, step: int = 1) list[Any][source]

[Selects a part of an array, and returns the new array]

Parameters:
  • start ([int]) – [index to slice from]

  • stop ([int], optional) – [index to slice to]. Defaults to end of the array.

  • step (int, optional) – [description]. Defaults to 1.

Returns:

[new array]

Return type:

[type]

some(func: Callable[[Any], bool]) bool[source]

Checks if any of the elements in an array pass a test

sort(func: Callable[[...], Any] | None = None) list[Any][source]

Sorts the elements of an array

splice(start: int, delete_count: int | None = None, *items: Any) list[Any][source]

Selects a part of an array, and returns the new array

toSource() list[Any][source]

Returns the source array.

toString() str[source]

Converts an array to a string, and returns the result

unshift(*args: Any) int[source]

[Adds new elements to the beginning of an array, and returns the new length]

Returns:

[the length of the array]

Return type:

[int]

class domonic.javascript.Boolean(value: Any = False)[source]

[Creates a Boolean Object. Warning this is NOT a boolean type. for that use Global.Boolean()]

class domonic.javascript.Date(date: Any = None, *args: Any, formatter: str = 'python', **kwargs: Any)[source]

javascript date

UTC() datetime[source]

Returns the number of milliseconds in a date since midnight of January 1, 1970, according to UTC time

getDate() int[source]

Returns the day of the month (from 1-31)

getDay() int[source]

Returns the day of the week (from 0-6 : Sunday-Saturday)

Returns:

An integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on

Return type:

int

getFullYear() int[source]

Returns the year

getHours() int[source]

Returns the hour (from 0-23)

getMilliseconds() int[source]

Returns the milliseconds (from 0-999)

getMinutes() int[source]

Returns the minutes (from 0-59)

getMonth() int[source]

Returns the month (from 0-11)

getSeconds() int[source]

Returns the seconds (from 0-59)

getTime() int[source]

Returns A number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and self.date

getTimezoneOffset() int[source]

Returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone

getUTCDate() int[source]

Returns the day of the month, according to universal time (from 1-31)

getUTCDay() int[source]

Returns the day of the week, according to universal time (from 0-6)

getUTCFullYear() int[source]

Returns the year, according to universal time

getUTCHours() int[source]

Returns the hour, according to universal time (from 0-23)

getUTCMilliseconds() int[source]

Returns the milliseconds, according to universal time (from 0-999)

getUTCMinutes() int[source]

Returns the minutes, according to universal time (from 0-59)

getUTCMonth() int[source]

Returns the month, according to universal time (from 0-11)

getUTCSeconds() int[source]

Returns the seconds, according to universal time (from 0-59)

getYear() int[source]

Deprecated. Use the getFullYear() method instead

static now() int[source]

Returns the number of milliseconds since midnight Jan 1, 1970

static parse(date_string: Any) int[source]

Parses a date string and returns the number of milliseconds since January 1, 1970

setDate(day: int) int[source]

Sets the day of the month of a date object

Parameters:

day (int) – An integer representing the day of the month.

Returns:

milliseconds between epoch and updated date.

Return type:

int

setFullYear(yearValue: int, monthValue: int | None = None, dateValue: int | None = None) int[source]

Sets the year of a date object

Parameters:
  • yearValue (_type_) – _description_

  • monthValue (int, optional) – _description_. Defaults to None.

  • dateValue (int, optional) – _description_. Defaults to None.

Returns:

milliseconds between epoch and updated date.

Return type:

int

setHours(hoursValue: int, minutesValue: int | None = None, secondsValue: int | None = None, msValue: int | None = None) int[source]

Sets the hour of a date object

Parameters:
  • hoursValue (int) – an integer between 0 and 23

  • minutesValue (int, optional) – an integer between 0 and 59

  • secondsValue (int, optional) – an integer between 0 and 59,

  • msValue (int, optional) – a number between 0 and 999,

Returns:

milliseconds between epoch and updated date.

Return type:

int

setMilliseconds(milliseconds: int) None[source]

Sets the milliseconds of a date object

Parameters:

milliseconds (int) – Milliseconds to set i.e 123

setMinutes(minutesValue: int, secondsValue: int | None = None, msValue: int | None = None) int[source]

Set the minutes of a date object

Parameters:
  • minutesValue (int, optional) – an integer between 0 and 59

  • secondsValue (int, optional) – an integer between 0 and 59,

  • msValue (int, optional) – a number between 0 and 999,

Returns:

milliseconds between epoch and updated date.

Return type:

int

setMonth(monthValue: int, dayValue: int | None = None) int[source]

Sets the month of a date object

Parameters:
  • monthValue (int) – a number from 0 to 11 indicating the month.

  • dayValue (int, optional) – an optional day of the month. Defaults to 0.

Returns:

milliseconds between epoch and updated date.

Return type:

int

setSeconds(secondsValue: int, msValue: int | None = None) int[source]

Sets the seconds of a date object

Parameters:
  • secondsValue (int) – _description_

  • msValue (int, optional) – _description_. Defaults to None.

Returns:

milliseconds between epoch and updated date.

Return type:

int

setTime(milliseconds: int | None = None, tz: Any = None) int | None[source]

Sets the date and time of a date object

Parameters:

milliseconds (_type_, optional) – _description_. Defaults to None.

Returns:

_description_

Return type:

_type_

setUTCDate(day: int) int[source]

Sets the day of the month of a date object, according to universal time

setUTCFullYear(year: int) int[source]

Sets the year of a date object, according to universal time

setUTCHours(hour: int) int[source]

Sets the hour of a date object, according to universal time

setUTCMilliseconds(milliseconds: int) int[source]

Sets the milliseconds of a date object, according to universal time

setUTCMinutes(minutes: int) int[source]

Set the minutes of a date object, according to universal time

setUTCMonth(month: int) int[source]

Sets the month of a date object, according to universal time

setUTCSeconds(seconds: int) int[source]

Set the seconds of a date object, according to universal time

setYear(year: int) int[source]

Deprecated. Use the setFullYear() method instead

toDateString() str[source]

Converts the date portion of a Date object into a readable string

toGMTString() str[source]

Deprecated. Use the toUTCString() method instead

toISOString() str[source]

Returns the date as a string, using the ISO standard

toJSON() str[source]

Returns the date as a string, formatted as a JSON date

toLocaleDateString() str[source]

Returns the date portion of a Date object as a string, using locale conventions

toLocaleString() str[source]

Converts a Date object to a string, using locale conventions

toLocaleTimeString() str[source]

Returns the time portion of a Date object as a string, using locale conventions

toString() str[source]

Returns a string representation of the date

toTimeString() str[source]

Converts the time portion of a Date object to a string

toUTCString() str[source]

Converts a Date object to a string, according to universal time

exception domonic.javascript.Error(message: str, *args: Any, **kwargs: Any)[source]

Raise Errors

class domonic.javascript.Function(func: Callable[[...], Any], *args: Any, **kwargs: Any)[source]

a Function object

apply(thisArg: Any = None, args: Sequence[Any] | None = None, **kwargs: Any) Any[source]

[calls a function with a given this value, and arguments provided as an array]

Parameters:

thisArg ([type]) – [The value of this provided for the call to func.]

Returns:

[result of calling the function.]

Return type:

[type]

bind(thisArg: Any, *args: Any, **kwargs: Any) Callable[[...], Any][source]

[creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.]

Parameters:
  • thisArg ([type]) – [The value to be passed as the this parameter to the target

  • called.] (function func when the bound function is)

Returns:

[A copy of the given function with the specified this value, and initial arguments (if provided).]

Return type:

[type]

call(thisArg: Any = None, *args: Any, **kwargs: Any) Any[source]

[calls a function with a given this value and arguments provided individually.]

Parameters:

thisArg ([type]) – [description]

Returns:

[result of calling the function.]

Return type:

[type]

toString() str[source]

[Returns a string representing the source code of the function. Overrides the]

class domonic.javascript.Global[source]

javascript global methods

NaN() str[source]

“Not-a-Number” value

static Number(x: Any) int | float | str[source]

Converts an object’s value to a number

static String(x: Any) str[source]

Converts an object’s value to a string

static clearTimeout(timeoutID: int) None[source]

[cancels a timer set with setTimeout()]

Parameters:

timeoutID ([str]) – [the identifier returned by setTimeout()]

static decodeURI(x: str) str[source]

Decodes a URI

static decodeURIComponent(x: str) str[source]

Decodes a URI component

static encodeURI(x: Any) str[source]

Encodes a URI

static encodeURIComponent(x: Any) str[source]

Encodes a URI component

static eval(pythonstring: str) Any[source]

Evaluates a string and executes it as if it was script code

static isFinite(x) bool[source]

Returns true if x is a finite number

static isNaN(x: Any) bool[source]

Determines whether a value is an illegal number

static parseFloat(x: str) float[source]

Parses a string and returns a floating point number

static parseInt(x: str) int[source]

Parses a string and returns an integer

static require(path: str) Any[source]

Loads a script from a file

static setTimeout(callback: str | Callable[[...], Any], t: int | float, *args: Any, **kwargs: Any) int[source]

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters:
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns:

[an identifier for the timer]

Return type:

[str]

undefined() None[source]

Indicates that a variable has not been assigned a value

class domonic.javascript.Job(interval: timedelta, execute: Callable[[...], Any], *args: Any, **kwargs: Any)[source]
run() None[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class domonic.javascript.Map(collection: list[Any] | dict[str, Any])[source]

Map holds key-value pairs and remembers the original insertion order of the keys.

clear() None[source]

Removes all key-value pairs from the Map object.

delete(key: str) bool[source]

Returns true if an element in the Map object existed and has been removed, or false if the element does not exist. Map.prototype.has(key) will return false afterwards.

entries() list[tuple[str, Any]][source]

Returns a new Iterator object that contains an array of [key, value] for each element in the Map object in insertion order.

get(key: str, default: Any = None) Any[source]

Returns the value associated to the key, or undefined if there is none.

has(key: str) bool[source]

Returns a boolean asserting whether a value has been associated to the key in the Map object or not.

keys() list[str][source]

Returns a new Iterator object that contains the keys for each element in the Map object in insertion order.

set(key: str, value: Any) Map[source]

Sets the value for the key in the Map object. Returns the Map object.

values() list[tuple[str, Any]][source]

Returns a new Iterator object that contains the values for each element in the Map object in insertion order.

class domonic.javascript.Math(obj: Any = None, *args: Mapping[str, Any], **kwargs: Any)[source]

Math class that mirrors javascript implementation.

i.e. you can pass strings and it will also work, Math.abs(‘-1’)

static hypot(*args: float) float[source]

returns the square root of the sum of squares of its arguments

static log2(*args: float) float[source]

returns the square root of the sum of squares of its arguments

static loglp(*args: float) float[source]

returns the natural logarithm (base e) of 1 + a number, that is

class domonic.javascript.Number(x: Any = '', *args: Any, **kwargs: Any)[source]

javascript Number methods

NEGATIVE_INFINITY = inf

Represents negative infinity (returned on overflow) Number

POSITIVE_INFINITY = -inf

Represents infinity (returned on overflow) Number

isInteger() bool[source]

Checks whether a value is an integer

isSafeInteger() bool[source]

Checks whether a value is a safe integer

toExponential(num: int | None = None) str[source]

Converts a number into an exponential notation

toFixed(digits: int) str[source]

[formats a number using fixed-point notation.]

Parameters:

digits ([int]) – [The number of digits to appear after the decimal point

Returns:

[A string representing the given number using fixed-point notation.]

Return type:

[str]

toPrecision(precision: int) str[source]

[returns a string representing the Number object to the specified precision.]

Parameters:

precision ([int]) – [An integer specifying the number of significant digits.]

Returns:

[A string representing a Number object in fixed-point or exponential notation rounded to precision significant digits]

Return type:

[str]

toString(base: int | None) str[source]

[returns a string representing the specified Number object.]

Parameters:

base (int) – [An integer in the range 2 through 36 specifying the base to use for representing numeric values.]

Returns:

[a string representing the specified Number object]

Return type:

[str]

exception domonic.javascript.ProgramKilled[source]
class domonic.javascript.Reflect[source]

The Reflect object provides the following static functions which have the same names as the proxy handler methods. Some of these methods are also the same as corresponding methods on Object, although they do have some subtle differences between them.

static apply(target: Callable[[...], Any], thisArgument: Any, argumentsList: Sequence[Any]) Any[source]

Calls a target function with arguments as specified by the argumentsList parameter. See also Function.prototype.apply().

static construct(target: Any, argumentsList: Sequence[Any], newTarget: Any = None) Any[source]

The new operator as a function. Equivalent to calling new target(…argumentsList). Also provides the option to specify a different prototype.

static defineProperty(target: Any, propertyKey: str, attributes: Any) Any[source]

Similar to Object.defineProperty(). Returns a Boolean that is true if the property was successfully defined.

static deleteProperty(target: Any, propertyKey: str) Any[source]

The delete operator as a function. Equivalent to calling delete target[propertyKey].

static get(target: Any, propertyKey: str, receiver: Any = None) Any[source]

Returns the value of the property. Works like getting a property from an object (target[propertyKey]) as a function.

static getOwnPropertyDescriptor(target: Any, propertyKey: str) Any[source]

Similar to Object.getOwnPropertyDescriptor(). Returns a property descriptor of the given property if it exists on the object, undefined otherwise.

getPrototypeOf() Any

Returns the prototype (internal [[Prototype]] property) of the specified object.

static has(target: Any, propertyKey: str) Any[source]

Returns a Boolean indicating whether the target has the property. Either as own or inherited. Works like the in operator as a function.

static ownKeys(target: Any) list[str][source]

Returns an array of the target object’s own (not inherited) property keys.

static preventExtensions(target: Any) Any[source]

Similar to Object.preventExtensions(). Returns a Boolean that is true if the update was successful.

static set(target: Any, propertyKey: str, value: Any, receiver: Any = None) Any[source]

A function that assigns values to properties. Returns a Boolean that is true if the update was successful.

static setPrototypeOf(target: Any, prototype: Any) Any[source]

A function that sets the prototype of an object. Returns a Boolean that is true if the update was successful.

class domonic.javascript.Screen[source]

screen

availHeight() int[source]

Returns the height of the screen (excluding the Windows Taskbar)

availWidth() int[source]

Returns the width of the screen (excluding the Windows Taskbar)

colorDepth() int[source]

Returns the colorDepth

height() int[source]

Returns the total height of the screen

pixelDepth() int[source]

Returns the pixelDepth

width() int[source]

Returns the total width of the screen

class domonic.javascript.String(x: Any = '', *args: Any, **kwargs: Any)[source]

javascript String methods

big() str[source]

[wraps the string in big tags]

Returns:

[the string in big tags]

Return type:

[str]

[wraps the string in blink tags]

Returns:

[the string in blink tags]

Return type:

[str]

bold() str[source]

[wraps the string in bold tags]

Returns:

[the string in bold tags]

Return type:

[str]

charAt(index: int) str[source]

[Returns the character at the specified index (position)]

Parameters:

index (int) – [index position]

Returns:

[the character at the specified index. if the index is out of range, an empty string is returned.]

Return type:

[str]

charCodeAt(index: int) int[source]

Returns the Unicode of the character at the specified index

codePointAt(index: int) int[source]

[Returns the Unicode code point at the specified index (position)]

Parameters:

index (int) – [index position]

Returns:

[the Unicode code point at the specified index (position)]

Return type:

[type]

compile(pattern: str) Pattern[str][source]

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

concat(*args, seperator: str = '') str[source]

[concatenates the string arguments to the calling string and returns a new string.]

Parameters:

seperator (str, optional) – []. Defaults to “”.

Returns:

[A new string containing the combined text of the strings provided.]

Return type:

[type]

div(*args: Any, **kwargs: Any) Any[source]

[wraps the string in a div tag]

Returns:

[the string in a div tag]

Return type:

[str]

endsWith(x: str, start: int = None, end: int = None) bool[source]

Checks whether a string ends with specified string/characters

fixed() str[source]

[wraps the string in fixed tags]

Returns:

[the string in fixed tags]

Return type:

[str]

fontcolor(color: str) str[source]

[wraps the string in font tags with a specified color]

Parameters:

color (str) – [the color to use]

Returns:

[the string in font tags]

Return type:

[str]

fontsize(size: str) str[source]

[wraps the string in font tags with a specified size]

Parameters:

size (str) – [the size to use]

Returns:

[the string in font tags]

Return type:

[str]

fromCharCode(*codes: int) str[source]

returns a string created from the specified sequence of UTF-16 code units

static fromCodePoint(codePoint: int) str[source]

Converts a Unicode code point into a string

includes(searchValue: str, position: int = 0) bool[source]

[returns true if the specified string is found within the calling String object,]

Parameters:
  • searchValue (str) – [The string value to search for.]

  • position (int, optional) – [the position to search from]. Defaults to 0.

Returns:

[a boolean value indicating whether the search value was found.]

Return type:

[type]

indexOf(searchValue: str, fromIndex: int = 0) int[source]

[returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex ]

Parameters:
  • searchValue (str) – [The string value to search for.]

  • fromIndex (int) – [An integer representing the index at which to start the search]

Returns:

[The index of the first occurrence of searchValue, or -1 if not found.]

Return type:

[type]

italics() str[source]

[wraps the string in italics tags]

Returns:

[the string in italics tags]

Return type:

[str]

lastIndexOf(searchValue: str, fromIndex: int = 0) int[source]

returns the last index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex

[wraps the string in a link tag]

Parameters:

url (str) – [the url to use]

Returns:

[the string in a link tag]

Return type:

[str]

localeCompare(comparisonString: str, locale: str = None, *args) int[source]

method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order

match(pattern: str) Match[str] | None[source]

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

matchAll(pattern: str) str[source]

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

padEnd(length: int, padChar: str = ' ') str[source]

[Pads the end of a string with a specified character (repeated, if needed) to create a new string.]

Parameters:
  • length (int) – [the length of the resulting string]

  • padChar (str, optional) – [the character to use for padding. Defaults to “ “].

Returns:

[the padded string]

Return type:

[str]

padStart(length: int, padChar: str = ' ') str[source]

[Pads the start of a string with a specified character]

Parameters:
  • length (int) – [the length of the resulting string]

  • padChar (str, optional) – [the character to use for padding. Defaults to “ “].

Returns:

[the padded string]

Return type:

[str]

static raw(string: str) str[source]

Returns the string as-is

repeat(count: int) str[source]

Returns a new string with a specified number of copies of an existing string

replace(old: str, new: str | Callable[[...], str]) str[source]

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. only replaces first one.

replaceAll(old: str, new: str) str[source]

[returns a new string where the specified values are replaced. ES2021]

Parameters:
  • old ([str]) – [word to remove]

  • new ([str]) – [word to replace it with]

Returns:

[new string with all occurences of old word replaced]

Return type:

[str]

search(searchValue: str, position: int = 0) bool[source]

[returns true if the specified string is found within the calling String object,] starting at the specified position. :param searchValue: [The string value to search for.] :type searchValue: str :param position: [the position to search from]. Defaults to 0. :type position: int, optional

Returns:

[a boolean value indicating whether the search value was found.]

Return type:

[type]

slice(start: int = 0, end: int = None) str[source]

Selects a part of an string, and returns the new string

small() str[source]

[wraps the string in small tags]

Returns:

[the string in small tags]

Return type:

[str]

split(expr: str) list[str][source]

[can split a string based on a regex]

Parameters:

expr ([str]) – [valid regex or string to split on]

Returns:

[list of str]

Return type:

[list]

startsWith(x: str, start: int = None, end: int = None) bool[source]

Checks whether a string begins with specified characters

strike() str[source]

[wraps the string in strike tags]

Returns:

[the string in strike tags]

Return type:

[str]

sub() str[source]

[wraps the string in sub tags]

Returns:

[the string in sub tags]

Return type:

[str]

substr(start: int = 0, end: int | None = None) str[source]

Extracts the characters from a string, beginning at a specified start position, and through the specified number of character

substring(start: int, end: int = None) str[source]

Extracts the characters from a string, between two specified indices

sup() str[source]

[wraps the string in sup tags]

Returns:

[the string in sup tags]

Return type:

[str]

static toCharCode(char: str) int[source]

Converts a Unicode string into a code point

static toCodePoint(char: str) int[source]

Converts a Unicode string into a code point

toLocaleLowerCase() str[source]

Converts a string to lowercase letters, according to the host’s locale

toLocaleUpperCase() str[source]

Converts a string to uppercase letters, according to the host’s locale

toLowerCase() str[source]

Converts a string to lowercase letters

toUpperCase() str[source]

Converts a string to uppercase letters

trim() str[source]

Removes whitespace from both ends of a string

trimEnd() str[source]

[Removes whitespace from the end of a string]

trimStart() str[source]

[Removes whitespace from the beginning of a string.]

webpage() str[source]

[wraps the string in a webpage]

Returns:

[the string as a webpage]

Return type:

[str]

class domonic.javascript.Window(*args: Any, **kwargs: Any)[source]

window

static alert(msg: Any) None[source]

Displays an alert box with a message and an OK button

static atob(dataString: str | bytes) str[source]

Decodes a base-64 encoded string

static btoa(dataString: str) bytes[source]

Encodes a string in base-64

clearTimeout() None

[cancels a timer set with setTimeout()]

Parameters:

timeoutID ([str]) – [the identifier returned by setTimeout()]

static prompt(msg: Any, default_text: str = '') str[source]

Displays a dialog box that prompts the visitor for input

static requestAnimationFrame(callback: Callable[[float], Any]) Any[source]

[requests a frame of an animation]

Parameters:

callback (callable) – [the callback function]

Returns:

[description]

Return type:

[type]

setTimeout(t: int | float, *args: Any, **kwargs: Any) int

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters:
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns:

[an identifier for the timer]

Return type:

[str]

class domonic.javascript.Worker(script: str)[source]

[A background task that can be created via script, which can send messages back to its creator. Creating a worker is done by calling the Worker(“path/to/worker/script”) constructor.] TODO - JSWorker - Node :param object: [takes a path to a python script] :type object: [str]

postMessage() None[source]

Sends a message — consisting of any object — to the worker’s inner scope.

terminate() None[source]

Immediately terminates the worker. This does not let worker finish its operations; it is halted at once. ServiceWorker instances do not support this method.

domonic.javascript.as_signed(value: int, bits: int) int[source]

Converts an unsigned integer to a signed integer.

domonic.javascript.clearTimeout(timeoutID: int) None

[cancels a timer set with setTimeout()]

Parameters:

timeoutID ([str]) – [the identifier returned by setTimeout()]

domonic.javascript.decodeURI(x: str) str

Decodes a URI

domonic.javascript.decodeURIComponent(x: str) str

Decodes a URI component

domonic.javascript.encodeURI(x: Any) str

Encodes a URI

domonic.javascript.encodeURIComponent(x: Any) str

Encodes a URI component

domonic.javascript.function(python_str: str) Callable[[], Any][source]

[evals a string i.e.

sup = function(‘’’print(hi)’’’) sup()

]

Parameters:

python_str ([str]) – [some valid python code as a string]

domonic.javascript.parseFloat(x: str) float

Parses a string and returns a floating point number

domonic.javascript.parseInt(x: str) int

Parses a string and returns an integer

domonic.javascript.setTimeout(callback: str | Callable[[...], Any], t: int | float, *args: Any, **kwargs: Any) int

[sets a timer which executes a function or evaluates an expression after a specified delay]

Parameters:
  • callback (function) – [method to be executed after the delay]

  • t ([int]) – [milliseconds]

Returns:

[an identifier for the timer]

Return type:

[str]

domonic.javascript.window

alias of Window

class domonic.animation.Animation(effect: AnimationEffect | None = None, timeline: Any = None, *, id: str = '')[source]
class domonic.animation.AnimationEffect(timing: EffectTiming | dict[str, Any] | None = None)[source]

Base class for effects that can be sampled over time and applied to targets.

class domonic.animation.AnimationPlaybackEvent(_type: str, options: dict[str, Any] | None = None, *args, **kwargs)[source]

Event carrying playback timing information for animation lifecycle hooks.

class domonic.animation.ComputedEffectTiming(timing: EffectTiming | None = None, *, activeDuration: float = 0.0, currentIteration: int | None = None, endTime: float = 0.0, progress: float | None = None)[source]

Resolved timing data derived from an effect plus a current local time.

class domonic.animation.EffectTiming(delay: float = 0.0, direction: str = 'normal', duration: float = 0.0, easing: str = 'linear', endDelay: float = 0.0, fill: str = 'none', iterationStart: float = 0.0, iterations: float = 1.0)[source]

Timing parameters shared by animation effects.

This is the author-facing timing object that describes delay, duration, direction, fill mode, easing, and iteration behaviour.

class domonic.animation.KeyframeEffect(target: Any, keyframes: list[dict[str, Any]] | dict[str, Any], options: EffectTiming | dict[str, Any] | None = None)[source]

Keyframe-based effect bound to a target object or DOM element.

domonic.terminal

  • call command line functions in python 3

exception domonic.terminal.TerminalException(error, message='An error message was recieved from terminal')[source]

raised if the terminal throws an exception

class domonic.terminal.alias(*args, **kwargs)
class domonic.terminal.apt(*args, **kwargs)
class domonic.terminal.ar(*args, **kwargs)
class domonic.terminal.asa(*args, **kwargs)
class domonic.terminal.at(*args, **kwargs)
class domonic.terminal.awk(*args, **kwargs)
class domonic.terminal.banner(*args, **kwargs)
class domonic.terminal.basename(*args, **kwargs)
class domonic.terminal.bash(*args, **kwargs)
class domonic.terminal.batch(*args, **kwargs)
class domonic.terminal.bc(*args, **kwargs)
class domonic.terminal.bg(*args, **kwargs)
class domonic.terminal.bind(*args, **kwargs)
class domonic.terminal.builtin(*args, **kwargs)
class domonic.terminal.cal(*args, **kwargs)
class domonic.terminal.caller(*args, **kwargs)
class domonic.terminal.cat(*args, **kwargs)
class domonic.terminal.cc(*args, **kwargs)
class domonic.terminal.cd(*args, **kwargs)[source]

NOTE - ‘cd’ does not run on terminal - cd is pointless as session opens and closes - so is overridden to change dirs via pure python

class domonic.terminal.cflow(*args, **kwargs)
class domonic.terminal.chgrp(*args, **kwargs)
class domonic.terminal.chmod(*args, **kwargs)
class domonic.terminal.chown(*args, **kwargs)
class domonic.terminal.cksum(*args, **kwargs)
class domonic.terminal.comm(*args, **kwargs)
class domonic.terminal.command(*args, **kwargs)[source]

wrapper class for all terminal commands

static run()[source]

runs any command on the terminal

Parameters:

cmd (str) – The command you want to run on the terminal

Returns:

the response as a string

Return type:

str

class domonic.terminal.compgen(*args, **kwargs)
class domonic.terminal.complete(*args, **kwargs)
class domonic.terminal.compopt(*args, **kwargs)
class domonic.terminal.compress(*args, **kwargs)
class domonic.terminal.convert(*args, **kwargs)
class domonic.terminal.cowsay(*args, **kwargs)
class domonic.terminal.cp(*args, **kwargs)
class domonic.terminal.cron(*args, **kwargs)
class domonic.terminal.crontab(*args, **kwargs)
class domonic.terminal.csplit(*args, **kwargs)
class domonic.terminal.ctags(*args, **kwargs)
class domonic.terminal.curl(*args, **kwargs)
class domonic.terminal.cut(*args, **kwargs)
class domonic.terminal.cxref(*args, **kwargs)
class domonic.terminal.date(*args, **kwargs)
class domonic.terminal.dd(*args, **kwargs)
class domonic.terminal.declare(*args, **kwargs)
class domonic.terminal.delta(*args, **kwargs)
class domonic.terminal.df(*args, **kwargs)
class domonic.terminal.diff(*args, **kwargs)
class domonic.terminal.dirname(*args, **kwargs)
class domonic.terminal.dirs(*args, **kwargs)
class domonic.terminal.disown(*args, **kwargs)
class domonic.terminal.du(*args, **kwargs)
class domonic.terminal.echo(*args, **kwargs)
class domonic.terminal.ed(*args, **kwargs)
class domonic.terminal.enable(*args, **kwargs)
class domonic.terminal.env(*args, **kwargs)
class domonic.terminal.ex(*args, **kwargs)
class domonic.terminal.exit(*args, **kwargs)
class domonic.terminal.expand(*args, **kwargs)
class domonic.terminal.export(*args, **kwargs)
class domonic.terminal.expr(*args, **kwargs)
class domonic.terminal.fc(*args, **kwargs)
class domonic.terminal.ffmpeg(*args, **kwargs)
class domonic.terminal.fg(*args, **kwargs)
class domonic.terminal.figlet(*args, **kwargs)
class domonic.terminal.file(*args, **kwargs)
class domonic.terminal.find(*args, **kwargs)
class domonic.terminal.finger(*args, **kwargs)
class domonic.terminal.fold(*args, **kwargs)
class domonic.terminal.fort77(*args, **kwargs)
class domonic.terminal.fuser(*args, **kwargs)
class domonic.terminal.gcc(*args, **kwargs)
class domonic.terminal.gencat(*args, **kwargs)
class domonic.terminal.get(*args, **kwargs)
class domonic.terminal.getconf(*args, **kwargs)
class domonic.terminal.getopts(*args, **kwargs)
class domonic.terminal.git(*args, **kwargs)
class domonic.terminal.grep(*args, **kwargs)
class domonic.terminal.groupadd(*args, **kwargs)
class domonic.terminal.groupdel(*args, **kwargs)
class domonic.terminal.groups(*args, **kwargs)
class domonic.terminal.gunzip(*args, **kwargs)
class domonic.terminal.gzip(*args, **kwargs)
class domonic.terminal.head(*args, **kwargs)
class domonic.terminal.history(*args, **kwargs)[source]
class domonic.terminal.iconv(*args, **kwargs)
class domonic.terminal.ifconfig(*args, **kwargs)
class domonic.terminal.ipconfig(*args, **kwargs)
class domonic.terminal.ipcrm(*args, **kwargs)
class domonic.terminal.ipcs(*args, **kwargs)
class domonic.terminal.jobs(*args, **kwargs)
class domonic.terminal.join(*args, **kwargs)
class domonic.terminal.jq(*args, **kwargs)
class domonic.terminal.kill(*args, **kwargs)
class domonic.terminal.killall(*args, **kwargs)
class domonic.terminal.less(*args, **kwargs)
class domonic.terminal.let(*args, **kwargs)
class domonic.terminal.lex(*args, **kwargs)
class domonic.terminal.ln(*args, **kwargs)
class domonic.terminal.local(*args, **kwargs)
class domonic.terminal.locale(*args, **kwargs)
class domonic.terminal.localedef(*args, **kwargs)
class domonic.terminal.logger(*args, **kwargs)
class domonic.terminal.logname(*args, **kwargs)
class domonic.terminal.logout(*args, **kwargs)
class domonic.terminal.lp(*args, **kwargs)
class domonic.terminal.ls(*args, **kwargs)
class domonic.terminal.m4(*args, **kwargs)
class domonic.terminal.mailx(*args, **kwargs)
class domonic.terminal.make(*args, **kwargs)
class domonic.terminal.man(*args, **kwargs)
class domonic.terminal.mapfile(*args, **kwargs)
class domonic.terminal.mesg(*args, **kwargs)
class domonic.terminal.mkdir(*args, **kwargs)
class domonic.terminal.mkfifo(*args, **kwargs)
class domonic.terminal.mkfile(*args, **kwargs)
class domonic.terminal.more(*args, **kwargs)
class domonic.terminal.mv(*args, **kwargs)
class domonic.terminal.nautilus(*args, **kwargs)
class domonic.terminal.newgrp(*args, **kwargs)
class domonic.terminal.nice(*args, **kwargs)
class domonic.terminal.nl(*args, **kwargs)
class domonic.terminal.nm(*args, **kwargs)
class domonic.terminal.nmap(*args, **kwargs)
class domonic.terminal.nohup(*args, **kwargs)
class domonic.terminal.npm(*args, **kwargs)
class domonic.terminal.od(*args, **kwargs)
class domonic.terminal.passwd(*args, **kwargs)
class domonic.terminal.paste(*args, **kwargs)
class domonic.terminal.patch(*args, **kwargs)
class domonic.terminal.pathchk(*args, **kwargs)
class domonic.terminal.pax(*args, **kwargs)
class domonic.terminal.ping(*args, **kwargs)
class domonic.terminal.pip(*args, **kwargs)
class domonic.terminal.popd(*args, **kwargs)
class domonic.terminal.pr(*args, **kwargs)
class domonic.terminal.printf(*args, **kwargs)
class domonic.terminal.prs(*args, **kwargs)
class domonic.terminal.ps(*args, **kwargs)
class domonic.terminal.pushd(*args, **kwargs)
class domonic.terminal.pwd(*args, **kwargs)
class domonic.terminal.python(*args, **kwargs)
class domonic.terminal.qalter(*args, **kwargs)
class domonic.terminal.qdel(*args, **kwargs)
class domonic.terminal.qhold(*args, **kwargs)
class domonic.terminal.qmove(*args, **kwargs)
class domonic.terminal.qmsg(*args, **kwargs)
class domonic.terminal.qrerun(*args, **kwargs)
class domonic.terminal.qrls(*args, **kwargs)
class domonic.terminal.qselect(*args, **kwargs)
class domonic.terminal.qsig(*args, **kwargs)
class domonic.terminal.qstat(*args, **kwargs)
class domonic.terminal.qsub(*args, **kwargs)
class domonic.terminal.read(*args, **kwargs)
class domonic.terminal.readarray(*args, **kwargs)
class domonic.terminal.readonly(*args, **kwargs)
class domonic.terminal.reboot(*args, **kwargs)
class domonic.terminal.renice(*args, **kwargs)
class domonic.terminal.rm(*args, **kwargs)
class domonic.terminal.rmdel(*args, **kwargs)
class domonic.terminal.rmdir(*args, **kwargs)
class domonic.terminal.rsync(*args, **kwargs)
class domonic.terminal.sact(*args, **kwargs)
class domonic.terminal.say(*args, **kwargs)
class domonic.terminal.sccs(*args, **kwargs)
class domonic.terminal.scp(*args, **kwargs)
class domonic.terminal.sed(*args, **kwargs)
class domonic.terminal.sh(*args, **kwargs)
class domonic.terminal.shift(*args, **kwargs)
class domonic.terminal.shopt(*args, **kwargs)
class domonic.terminal.shutdown(*args, **kwargs)
class domonic.terminal.sleep(*args, **kwargs)
class domonic.terminal.sort(*args, **kwargs)
class domonic.terminal.source(*args, **kwargs)
class domonic.terminal.split(*args, **kwargs)
class domonic.terminal.ssh(*args, **kwargs)
class domonic.terminal.strings(*args, **kwargs)
class domonic.terminal.strip(*args, **kwargs)
class domonic.terminal.stty(*args, **kwargs)
class domonic.terminal.suspend(*args, **kwargs)
class domonic.terminal.tabs(*args, **kwargs)
class domonic.terminal.tail(*args, **kwargs)
class domonic.terminal.talk(*args, **kwargs)
class domonic.terminal.tar(*args, **kwargs)
class domonic.terminal.tee(*args, **kwargs)
class domonic.terminal.test(*args, **kwargs)
class domonic.terminal.time(*args, **kwargs)
class domonic.terminal.times(*args, **kwargs)
class domonic.terminal.touch(*args, **kwargs)
class domonic.terminal.tput(*args, **kwargs)
class domonic.terminal.tr(*args, **kwargs)
class domonic.terminal.trap(*args, **kwargs)
class domonic.terminal.true(*args, **kwargs)
class domonic.terminal.tsort(*args, **kwargs)
class domonic.terminal.tty(*args, **kwargs)
class domonic.terminal.typeset(*args, **kwargs)
class domonic.terminal.ulimit(*args, **kwargs)
class domonic.terminal.umask(*args, **kwargs)
class domonic.terminal.unalias(*args, **kwargs)
class domonic.terminal.uname(*args, **kwargs)
class domonic.terminal.uncompress(*args, **kwargs)
class domonic.terminal.unexpand(*args, **kwargs)
class domonic.terminal.unget(*args, **kwargs)
class domonic.terminal.uniq(*args, **kwargs)
class domonic.terminal.unset(*args, **kwargs)
class domonic.terminal.uptime(*args, **kwargs)
class domonic.terminal.useradd(*args, **kwargs)
class domonic.terminal.userdel(*args, **kwargs)
class domonic.terminal.users(*args, **kwargs)
class domonic.terminal.uucp(*args, **kwargs)
class domonic.terminal.uudecode(*args, **kwargs)
class domonic.terminal.uuencode(*args, **kwargs)
class domonic.terminal.uustat(*args, **kwargs)
class domonic.terminal.uux(*args, **kwargs)
class domonic.terminal.val(*args, **kwargs)
class domonic.terminal.wait(*args, **kwargs)
class domonic.terminal.wc(*args, **kwargs)
class domonic.terminal.wget(*args, **kwargs)
class domonic.terminal.what(*args, **kwargs)
class domonic.terminal.who(*args, **kwargs)
class domonic.terminal.whoami(*args, **kwargs)
class domonic.terminal.write(*args, **kwargs)
class domonic.terminal.xargs(*args, **kwargs)
class domonic.terminal.yacc(*args, **kwargs)
class domonic.terminal.zcat(*args, **kwargs)

domonic.JSON

JSON and table-conversion helpers used throughout domonic.

This module focuses on practical conversions between Python objects, JSON payloads, CSV data, and simple HTML table structures.

domonic.JSON.csv2json(csv_filepath: str | Path, json_filepath: str | Path | None = None) str[source]

convert a CSV to JSON.

domonic.JSON.csvify()[source]

takes a json array and dumps a csv file

Parameters:
  • arr (list) – the json array

  • outfile (list) – the output file

Returns:

a csv file

Return type:

str

domonic.JSON.flatten(b: Mapping[str, Any], delim: str = '__') dict[str, Any][source]

# i.e. input = map( lambda x: JSON.flatten( x, “__” ), input )

domonic.JSON.parse(json_string: str | bytes | bytearray) Any[source]

[take a json string and return a python object]

Parameters:

json_string (str) – [a json string]

Returns:

[a python object]

Return type:

[type]

domonic.JSON.parse_file(filepath: str | Path) Any[source]

[loads a json file and returns a python object]

Parameters:

filepath (str) – [path to json file]

Returns:

[a python object]

Return type:

[type]

domonic.JSON.stringify(data: Any, filepath: str | Path | None = None, **kwargs) str[source]

[stringify a python object]

Parameters:
  • data ([type]) – [the python object]

  • filepath (str, optional) – [an optional filepath to save the stringified object] [default: None]

Returns:

[the stringified object]

Return type:

[type]

domonic.JSON.table2json(node) list[dict[str, str]][source]

Convert a domonic table node back into a list of row dictionaries.

domonic.JSON.tablify()[source]

takes a json array and returns a html table

Parameters:

arr (list) – the json array

Returns:

a html table

Return type:

str

domonic.CDN

For quick reference when prototyping

class domonic.CDN.CDN_CSS[source]

CSS Libraries

class domonic.CDN.CDN_IMG[source]

CDN images

static PLACEHOLDER(width: int = 100, height: int = 100, HTTP: str = '', seperator: str = '/') str[source]

to update do CDN_IMG.PLACEHOLDER_SERVICE = “placebear.com/g” usage : img(_src=CDN_IMG.PLACEHOLDER(300,100)) default HTTP is none, to let the browser decide # use optional seperator if the site uses x instead of slash img(_src=CDN_IMG.PLACEHOLDER(300,100,’x’))

class domonic.CDN.CDN_JS[source]

JavaScript libraries

domonic.events

DOM-style event classes and dispatch machinery for domonic.

This module provides EventTarget plus a broad set of web-platform-flavoured event classes so DOM nodes, windows, animations, and helper objects can share a common event model.

class domonic.events.AbortController[source]

Controller used to abort work associated with an AbortSignal.

class domonic.events.AbortSignal[source]

Signal object used to communicate cancellation.

class domonic.events.AnimationEvent[source]
ANIMATIONEND: str = 'animationend'
ANIMATIONITERATION: str = 'animationiteration'
ANIMATIONSTART: str = 'animationstart'
animationName

Returns the name of the animation

elapsedTime

Returns the number of seconds an animation has been running

pseudoElement

Returns the name of the pseudo-element of the animation

class domonic.events.BeforeUnloadEvent(_type: str, options: dict[str, Any] | None = None, *args, **kwargs)[source]
BEFOREUNLOAD: ClassVar[str] = 'beforeunload'

BeforeUnloadEvent

class domonic.events.ClipboardEvent[source]
COPY: str = 'copy'
CUT: str = 'cut'
PASTE: str = 'paste'
clipboardData

Returns an object containing the data affected by the clipboard operation

class domonic.events.CloseEvent[source]
CLOSE: str = 'close'
class domonic.events.CompositionEvent[source]
class domonic.events.CustomEvent[source]
class domonic.events.DOMContentLoadedEvent[source]
DOMCONTENTLOADED: str = 'DOMContentLoaded'
document

Returns the document that was loaded

class domonic.events.DragEvent[source]
DRAG: str = 'drag'
DROP: str = 'drop'
END: str = 'dragend'
ENTER: str = 'dragenter'
EXIT: str = 'dragexit'
LEAVE: str = 'dragleave'
OVER: str = 'dragover'
START: str = 'dragstart'
dataTransfer

Returns the data that is dragged/dropped

class domonic.events.ErrorEvent[source]
ERROR: str = 'error'
class domonic.events.Event(_type: str = '', options: dict[str, Any] | None = None, *args, **kwargs)[source]

Event class represents events and their properties.

ABORT: str = 'abort'
AFTERPRINT: str = 'afterprint'
BEFOREPRINT: str = 'beforeprint'
BEFOREUNLOAD: str = 'beforeunload'
CANPLAY: str = 'canplay'
CANPLAYTHROUGH: str = 'canplaythrough'
CHANGE: str = 'change'
DURATIONCHANGE: str = 'durationchange'
EMPTIED: str = 'emptied'
ENDED: str = 'ended'
ERROR: str = 'error'
FULLSCREENCHANGE: str = 'fullscreenchange'
FULLSCREENERROR: str = 'fullscreenerror'
INPUT: str = 'input'
INVALID: str = 'invalid'
LOAD: str = 'load'
LOADEDDATA: str = 'loadeddata'
LOADEDMETADATA: str = 'loadedmetadata'
MESSAGE: str = 'message'
OFFLINE: str = 'offline'
ONLINE: str = 'online'
OPEN: str = 'open'
PAUSE: str = 'pause'
PLAY: str = 'play'
PLAYING: str = 'playing'
PROGRESS: str = 'progress'
RATECHANGE: str = 'ratechange'
READYSTATECHANGE: str = 'readystatechange'
RESET: str = 'reset'
RESIZE: str = 'resize'
SCROLL: str = 'scroll'
SEARCH: str = 'search'
SEEKED: str = 'seeked'
SEEKING: str = 'seeking'
SELECT: str = 'select'
SHOW: str = 'show'
STALLED: str = 'stalled'
SUBMIT: str = 'submit'
SUSPEND: str = 'suspend'
TOGGLE: str = 'toggle'
UNLOAD: str = 'unload'
VOLUMECHANGE: str = 'volumechange'
WAITING: str = 'waiting'
composedPath()[source]

Returns a list of the event’s path, from the root to the target.

initEvent(_type: str | None = None, bubbles: bool = True, cancelable: bool = True, *args, **kwargs) Event[source]

Initialize the event.

msConvertURL(url)[source]

Converts the provided URL to a format recognized by Internet Explorer.

Parameters:

url (str) – The URL to be converted.

Returns:

The converted URL.

Return type:

str

preventDefault() None[source]

Prevents the default action associated with the event, if cancelable.

This method is used to signal that the event should not trigger its default behavior.

Returns:

None

stopImmediatePropagation() None[source]

Prevents further propagation of the current event and immediately stops other event listeners in the same phase from being invoked.

This method is used to stop the event’s propagation immediately and ensure that no other listeners in the same phase are invoked.

Returns:

None

stopPropagation()[source]

[prevents further propagation of the current event in the capturing and bubbling phases]

domonic.events.EventDispatcher

legacy alias

class domonic.events.EventListener[source]

Interface-style base for listener objects with handleEvent().

class domonic.events.EventListenerOptions(capture: bool = False, once: bool = False, passive: bool = False, signal: Any = None)[source]

Dictionary-like helper for DOM listener options.

Supports the common capture, once, passive, and signal fields accepted by addEventListener().

class domonic.events.EventTarget(*args, **kwargs)[source]

DOM-style event target base class.

Extend EventTarget to give an object support for addEventListener(), removeEventListener(), and dispatchEvent() with DOM-like capture, target, and bubble semantics where appropriate.

addEventListener(eventType: str, callback: Callable[[...], Any], options: bool | dict[str, Any] | None = None, *args, **kwargs) None[source]

Add an event listener for the given event type.

Parameters:
  • eventType (str) – The type of the event to listen for.

  • callback (Callable) – The callback function to be executed when the event occurs.

dispatchEvent(event: Any) bool[source]

Dispatch the specified event to all registered event listeners.

Parameters:

event (Dict) – The event object to be dispatched.

Returns:

True if the event was successfully dispatched, otherwise False.

Return type:

bool

async dispatchEventAsync(event: Any) bool[source]

Dispatch the specified event asynchronously to all registered event listeners.

Parameters:

event (Dict) – The event object to be dispatched.

Returns:

True if the event was successfully dispatched, otherwise False.

Return type:

bool

Usage:

To dispatch an event asynchronously, use the await keyword when calling this method.

Example:

event_data = {"message": "Hello, world!"}
async_event = {"type": "async_event", "data": event_data}
await target.dispatchEventAsync(async_event)
hasEventListener(eventType: str) bool[source]

Check if an event listener for the given event type exists.

Parameters:

eventType (str) – The type of the event.

Returns:

True if listeners for the event type exist, otherwise False.

Return type:

bool

removeEventListener(eventType: str, callback: Callable[[...], Any], options: bool | dict[str, Any] | None = None) None[source]

Remove an event listener for the given event type.

Parameters:
  • eventType (str) – The type of the event.

  • callback (Callable) – The callback function to be removed.

class domonic.events.ExtendableEvent[source]
extendable

Returns whether the event is extendable or not

class domonic.events.FetchEvent[source]
FETCH: str = 'fetch'
clientId

Returns the client ID of the fetch request

request

Returns the request object

respondWith(response)[source]

Returns a promise that resolves to the response object

waitUntil(promise)[source]

Returns a promise that resolves when the response is available

class domonic.events.FocusEvent[source]
BLUR: str = 'blur'
FOCUS: str = 'focus'
FOCUSIN: str = 'focusin'
FOCUSOUT: str = 'focusout'
class domonic.events.GamePadEvent[source]
START: str = 'gamepadconnected'
STOP: str = 'gamepaddisconnected'
class domonic.events.HashChangeEvent[source]
CHANGE: str = 'hashchange'
class domonic.events.InputEvent[source]
CHANGE: str = 'change'
INPUT: str = 'input'
SELECT: str = 'select'
data

Returns the inserted characters

dataTransfer

Returns an object containing information about the inserted/deleted data

getTargetRanges()[source]

Returns an array containing target ranges that will be affected by the insertion/deletion

inputType

Returns the type of the change (i.e “inserting” or “deleting”)

isComposing

Returns whether the state of the event is composing or not

class domonic.events.KeyboardEvent(_type: str, options: dict = None, *args, **kwargs)[source]

keyboard events

DOM_KEY_LOCATION_LEFT: int = 1
DOM_KEY_LOCATION_NUMPAD: int = 3
DOM_KEY_LOCATION_RIGHT: int = 2
DOM_KEY_LOCATION_STANDARD: int = 0
KEYDOWN: str = 'keydown'
KEYPRESS: str = 'keypress'
KEYUP: str = 'keyup'
class domonic.events.MessageEvent[source]
CONNECT: str = 'connect'
DISCONNECT: str = 'disconnect'
MESSAGE: str = 'message'
data

Returns the data of the message

lastEventId

Returns the last event id of the message

origin

Returns the origin of the message

ports

Returns the ports of the message

source

Returns the source of the message

class domonic.events.MouseEvent(_type: str, options: dict = None, *args, **kwargs)[source]

mouse events

CLICK: str = 'click'
CONTEXTMENU: str = 'contextmenu'
DBLCLICK: str = 'dblclick'
MOUSEDOWN: str = 'mousedown'
MOUSEENTER: str = 'mouseenter'
MOUSELEAVE: str = 'mouseleave'
MOUSEMOVE: str = 'mousemove'
MOUSEOUT: str = 'mouseout'
MOUSEOVER: str = 'mouseover'
MOUSEUP: str = 'mouseup'
getModifierState(keyArg: str)[source]

Returns an array containing target ranges that will be affected by the insertion/deletion

class domonic.events.PageTransitionEvent[source]
PAGEHIDE: str = 'pagehide'
PAGESHOW: str = 'pageshow'
persisted

Returns whether the webpage was cached by the browser

class domonic.events.PointerEvent[source]
POINTER: str = 'pointer'
POINTERCANCEL: str = 'pointercancel'
POINTERDOWN: str = 'pointerdown'
POINTERENTER: str = 'pointerenter'
POINTERLEAVE: str = 'pointerleave'
POINTERMOVE: str = 'pointermove'
POINTEROUT: str = 'pointerout'
POINTEROVER: str = 'pointerover'
POINTERUP: str = 'pointerup'
class domonic.events.PopStateEvent[source]
POPSTATE: str = 'popstate'
state

Returns an object containing a copy of the history entries

class domonic.events.ProgressEvent[source]
ABORT: str = 'abort'
ERROR: str = 'error'
LOAD: str = 'load'
LOADED: str = 'loaded'
LOADEND: str = 'loadend'
LOADSTART: str = 'loadstart'
PROGRESS: str = 'progress'
TIMEOUT: str = 'timeout'
class domonic.events.PromiseRejectionEvent[source]
HANDLED: str = 'rejectionhandled'
UNHANDLED: str = 'unhandledrejection'
isRejected

Returns whether the promise was rejected or not

promise

Returns the promise that was rejected

reason

Returns the reason of the rejection

class domonic.events.SVGEvent[source]
ABORT: str = 'abort'
ERROR: str = 'error'
LOAD: str = 'load'
LOADEDDATA: str = 'loadeddata'
LOADEDMETADATA: str = 'loadedmetadata'
LOADSTART: str = 'loadstart'
PROGRESS: str = 'progress'
SCROLL: str = 'scroll'
UNLOAD: str = 'unload'
class domonic.events.SecurityPolicyViolationEvent[source]
SECURITY_POLICY_VIOLATION: str = 'securitypolicyviolation'
blockedURI

Returns the blocked URI

frame

Returns the frame that violated the policy

isFrameAncestor

Returns whether the frame is an ancestor of the frame that violated the policy

isMainFrame

Returns whether the frame is the main frame

originalPolicy

Returns the original policy

violatedDirective

Returns the violated directive

class domonic.events.StorageEvent[source]
STORAGE: str = 'storage'
key

Returns the key of the changed storage item

newValue

Returns the new value of the changed storage item

oldValue

Returns the old value of the changed storage item

storageArea

Returns an object representing the affected storage object

url

Returns the URL of the changed item’s document

class domonic.events.SubmitEvent[source]
SUBMIT: str = 'submit'
class domonic.events.SyncEvent[source]
SYNC: str = 'sync'
lastChance

Returns whether the sync event is the last chance or not

tag

Returns the tag of the sync event

class domonic.events.TimerEvent(_type: str, options: dict = None, *args, **kwargs)[source]
TIMER: str = 'timer'
TIMER_COMPLETE: str = 'timercomplete'

TimerEvent

class domonic.events.TouchEvent[source]
TOUCHCANCEL: str = 'touchcancel'
TOUCHEND: str = 'touchend'
TOUCHMOVE: str = 'touchmove'
TOUCHSTART: str = 'touchstart'
class domonic.events.TransitionEvent[source]
TRANSITIONEND: str = 'transitionend'
elapsedTime

Returns the number of seconds a transition has been running

propertyName

Returns the name of the transition

pseudoElement

Returns the name of the pseudo-element of the transition

class domonic.events.TweenEvent[source]
COMPLETE: str = 'onComplete'
PAUSE: str = 'onPause'
RESET: str = 'onReset'
START: str = 'onStart'
STOP: str = 'onStop'
TIMER: str = 'onTimer'
UNPAUSE: str = 'onUnPause'
UPDATE_END: str = 'onUpdateEnd'
UPDATE_START: str = 'onUpdateStart'
class domonic.events.UIEvent(_type: str, options: dict = None, *args, **kwargs)[source]

UIEvent is a specialized event class for user interface events.

initUIEvent(_type: str, canBubble: bool, cancelable: bool, view, detail) UIEvent[source]

Initialize a UIEvent with specific parameters.

Parameters:
  • _type (str) – The type of the UIEvent.

  • canBubble (bool) – Specifies whether the event should bubble.

  • cancelable (bool) – Specifies whether the event is cancelable.

  • view – The associated view or window.

  • detail – Additional event-specific detail.

Returns:

The initialized UIEvent object.

Return type:

UIEvent

class domonic.events.WheelEvent[source]
WHEEL: str = 'wheel'

domonic.style

CSSOM-flavoured style helpers for domonic.

This module provides CSSStyleDeclaration, stylesheet lists, rule objects, and the basic structures needed to attach style data to DOM nodes and documents.

class domonic.style.CSSColorProfileRule[source]

The CSSColorProfileRule interface represents an @color-profile rule.

class domonic.style.CSSConditionRule[source]

The CSSConditionRule interface represents a condition rule.

class domonic.style.CSSCounterStyleRule[source]

The CSSCounterStyleRule interface represents a @counter-style rule.

class domonic.style.CSSDocumentRule[source]

The CSSDocumentRule interface represents an @document rule.

class domonic.style.CSSFontFaceRule[source]

The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet.

class domonic.style.CSSFontFeatureValuesRule[source]

The CSSFontFeatureValuesRule interface represents a @font-feature-values rule.

class domonic.style.CSSGroupingRule[source]

The CSSGroupingRule interface represents a @grouping rule.

class domonic.style.CSSImportRule[source]

The CSSImportRule interface represents an @import rule in a CSS style sheet.

class domonic.style.CSSKeyframeRule[source]

The CSSKeyframeRule interface represents a single @keyframes at-rule.

class domonic.style.CSSKeyframesRule[source]

The CSSKeyframesRule interface represents a @keyframes at-rule.

class domonic.style.CSSMediaRule[source]

The CSSMediaRule interface represents a @media rule in a CSS style sheet.

class domonic.style.CSSNamespaceRule[source]

The CSSNamespaceRule interface represents an @namespace rule in a CSS style sheet.

class domonic.style.CSSPageRule[source]

The CSSPageRule interface represents a @page rule in a CSS style sheet.

class domonic.style.CSSRule[source]

Base class for CSSOM rules stored inside a stylesheet.

property cssText

16pt }” or “@import ‘url’”. To access or modify parts of the rule (e.g. the value of “font-size” in the example) use the properties on the specialized interface for the rule’s type.

Type:

Represents the textual representation of the rule, e.g. “h1,h2 { font-size

class domonic.style.CSSRuleList(iterable=(), /)[source]

A CSSRuleList represents an ordered collection of read-only CSSRule objects. While the CSSRuleList object is read-only, and cannot be directly modified, it is considered a live object, as the content can change over time.

item(index: int) CSSRule[source]

Gets a single CSSRule.

property length: int

Returns an integer representing the number of CSSRule objects in the collection.

class domonic.style.CSSStyleDeclaration(parentNode=None, *args, **kwargs)[source]

The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

A CSSStyleDeclaration object can be exposed using three different APIs:

Via HTMLElement.style, which deals with the inline styles of a single element (e.g., <div style=”…”>). Via the CSSStyleSheet API. For example, document.styleSheets[0].cssRules[0].style returns a CSSStyleDeclaration object on the first CSS rule in the document’s first stylesheet. Via Window.getComputedStyle(), which exposes the CSSStyleDeclaration object as a read-only interface.

getPropertyCSSValue()[source]

Only supported via getComputedStyle in Firefox. Returns the property value as a CSSPrimitiveValue or null for shorthand properties.

getPropertyPriority(propertyName)[source]

Returns the optional priority, “important”.

getPropertyValue(propertyName: str) str[source]

Returns the value of the property with the specified name.

item(index: int) str[source]

Returns a CSS property name by its index, or the empty string if the index is out-of-bounds. An alternative to accessing nodeList[i] (which instead returns undefined when i is out-of-bounds). This is mostly useful for non-JavaScript DOM implementations.

property length

The number of properties. See the item() method below.

removeProperty(propertyName)[source]

Removes a property from the CSS declaration block.

class domonic.style.CSSStyleRule[source]

The CSSStyleRule interface represents a single style rule in a CSS style sheet.

property cssText

Returns the textual representation of the rule.

class domonic.style.CSSStyleSheet[source]

Creates a new CSSStyleSheet object.

addRule(selectorText: str, style: str, index: int)[source]

Adds a new rule to the stylesheet given the selector to which the style applies and the style block to apply to the matching elements. This differs from insertRule(), which takes the textual representation of the entire rule as a single string.

deleteRule(index: int)[source]

Deletes the rule at the specified index into the stylesheet’s rule list.

insertRule(rule: str, index: int = None)[source]

Inserts a new rule at the specified position in the stylesheet, given the textual representation of the rule.

removeRule(index: int)[source]

Functionally identical to deleteRule(); removes the rule at the specified index from the stylesheet’s rule list.

replace(text: str)[source]

Asynchronously replaces the content of the stylesheet and returns a Promise that resolves with the updated CSSStyleSheet.

replaceSync(text: str)[source]

Synchronously replaces the content of the stylesheet.

class domonic.style.CSSSupportsRule[source]

The CSSSupportsRule interface represents a @supports at-rule.

class domonic.style.MediaList(iterable=(), /)[source]

The MediaList interface represents a list of media. It is used in the @media at-rule.

appendMedium(newMedium: str) None[source]

Appends a new medium to the end of the list.

deleteMedium(oldMedium: str) None[source]

Removes medium in the media list. If the medium is not found nothing happens.

item(index: int) str[source]

Returns the media at the given index in the MediaList.

property length: int

Returns the number of media in the list.

property mediaText: str

Returns a string containing the text of the media query.

class domonic.style.Style(parent_node=None)[source]

[ js syntax styles ] # TODO - just add normal float? # TODO - consider camel case for hyphen params? # TODO - not json serialisable due to the decorators.

property alignContent

Sets or returns the alignment between the lines inside a flexible container when the items do not use all available space

property alignItems

Sets or returns the alignment for items inside a flexible container

property alignSelf

Sets or returns the alignment for selected items inside a flexible container

property animation

shorthand property for all the animation properties below, except the animationPlayState property

property animationDelay

Sets or returns when the animation will start

property animationDirection

Sets or returns whether or not the animation should play in reverse on alternate cycles

property animationDuration

Sets or returns how many seconds or milliseconds an animation takes to complete one cycle

property animationFillMode

Sets or returns what values are applied by the animation outside the time it is executing

property animationIterationCount

Sets or returns the number of times an animation should be played

property animationName

Sets or returns a name for the @keyframes animation

property animationPlayState

Sets or returns whether the animation is running or paused

property animationTimingFunction

Sets or returns the speed curve of the animation

property backfaceVisibility

Sets or returns whether or not an element should be visible when not facing the screen

property background

Sets or returns all the background properties in one declaration

property backgroundAttachment

Sets or returns whether a background-image is fixed or scrolls with the page

property backgroundClip

Sets or returns the painting area of the background

property backgroundColor

Sets or returns the background-color of an element

property backgroundImage

Sets or returns the background-image for an element

property backgroundOrigin

Sets or returns the positioning area of the background images

property backgroundPosition

Sets or returns the starting position of a background-image

property backgroundRepeat

Sets or returns how to repeat (tile) a background-image

property backgroundSize

Sets or returns the size of the background image

property border

Sets or returns borderWidth, borderStyle, and borderColor in one declaration

property borderBottom

Sets or returns all the borderBottom properties in one declaration

property borderBottomColor

Sets or returns the color of the bottom border 1

property borderBottomLeftRadius

Sets or returns the shape of the border of the bottom-left corner

property borderBottomRightRadius

Sets or returns the shape of the border of the bottom-right corner

property borderBottomStyle

Sets or returns the style of the bottom border

property borderBottomWidth

Sets or returns the width of the bottom border

property borderCollapse

Sets or returns whether the table border should be collapsed into a single border, or not

property borderColor

Sets or returns the color of an element’s border (can have up to four values)

property borderImage

horthand property for setting or returning all the borderImage properties

property borderImageOutset

Sets or returns the amount by which the border image area extends beyond the border box

property borderImageRepeat

Sets or returns whether the image-border should be repeated, rounded or stretched

property borderImageSlice

Sets or returns the inward offsets of the image-border

property borderImageSource

Sets or returns the image to be used as a border

property borderImageWidth

Sets or returns the widths of the image-border

property borderLeft

Sets or returns all the borderLeft properties in one declaration

property borderLeftColor

Sets or returns the color of the left border

property borderLeftStyle

Sets or returns the style of the left border

property borderLeftWidth

Sets or returns the width of the left border

property borderRadius

A shorthand property for setting or returning all the four borderRadius properties

property borderRight

Sets or returns all the borderRight properties in one declaration

property borderRightColor

Sets or returns the color of the right border

property borderRightStyle

Sets or returns the style of the right border

property borderRightWidth

Sets or returns the width of the right border

property borderSpacing

Sets or returns the space between cells in a table

property borderStyle

Sets or returns the style of an element’s border (can have up to four values)

property borderTop

Sets or returns all the borderTop properties in one declaration

property borderTopColor

Sets or returns the color of the top border

property borderTopLeftRadius

Sets or returns the shape of the border of the top-left corner

property borderTopRightRadius

Sets or returns the shape of the border of the top-right corner

property borderTopStyle

Sets or returns the style of the top border

property borderTopWidth

Sets or returns the width of the top border

property borderWidth

Sets or returns the width of an element’s border (can have up to four values)

property bottom

Sets or returns the bottom position of a positioned element

property boxDecorationBreak

Sets or returns the behaviour of the background and border of an element at page-break, or, for in-line elements, at line-break.

property boxShadow

ttaches one or more drop-shadows to the box

property boxSizing

llows you to define certain elements to fit an area in a certain way

property captionSide

Sets or returns the position of the table caption

property clear

Sets or returns the position of the element relative to floating objects

property clip

Sets or returns which part of a positioned element is visible

property color

Sets or returns the color of the text

property columnCount

Sets or returns the number of columns an element should be divided into

property columnFill

Sets or returns how to fill columns

property columnGap

Sets or returns the gap between the columns

property columnRule

shorthand property for setting or returning all the columnRule properties

property columnRuleColor

Sets or returns the color of the rule between columns

property columnRuleStyle

Sets or returns the style of the rule between columns

property columnRuleWidth

Sets or returns the width of the rule between columns

property columnSpan

Sets or returns how many columns an element should span across

property columnWidth

Sets or returns the width of the columns

property columns

horthand property for setting or returning columnWidth and columnCount

property content

after pseudo-elements, to insert generated content

Type:

d with the

Type:

before and

property counterIncrement

Increments one or more counters

property counterReset

Creates or resets one or more counters

property cssFloat

Sets or returns the horizontal alignment of an element

property cursor

Sets or returns the type of cursor to display for the mouse pointer

property direction

Sets or returns the text direction

property display

Sets or returns an element’s display type

property emptyCells

Sets or returns whether to show the border and background of empty cells, or not

property filter

Sets or returns image filters (visual effects, like blur and saturation)

property flex

Sets or returns the length of the item, relative to the rest

property flexBasis

Sets or returns the initial length of a flexible item

property flexDirection

Sets or returns the direction of the flexible items

property flexFlow

A shorthand property for the flexDirection and the flexWrap properties

property flexGrow

Sets or returns how much the item will grow relative to the rest

property flexShrink

Sets or returns how the item will shrink relative to the rest

property flexWrap

Sets or returns whether the flexible items should wrap or not

property font

Sets or returns fontStyle, fontVariant, fontWeight, fontSize, lineHeight, and fontFamily in one declaration

property fontFamily

Sets or returns the font family for text

property fontSize

Sets or returns the font size of the text

property fontSizeAdjust

eserves the readability of text when font fallback occurs

property fontStretch

ects a normal, condensed, or expanded face from a font family

property fontStyle

Sets or returns whether the style of the font is normal, italic or oblique

property fontVariant

Sets or returns whether the font should be displayed in small capital letters

property fontWeight

Sets or returns the boldness of the font

property hangingPunctuation

ecifies whether a punctuation character may be placed outside the line box

property height

Sets or returns the height of an element

property hyphens

Sets how to split words to improve the layout of paragraphs

property icon

Provides the author the ability to style an element with an iconic equivalent

property imageOrientation

Specifies a rotation in the right or clockwise direction that a user agent applies to an image

property isolation

efines whether an element must create a new stacking content

property justifyContent

Sets or returns the alignment between the items inside a flexible container when the items do not use all available space.

property left

Sets or returns the left position of a positioned element

property letterSpacing

Sets or returns the space between characters in a text

property lineHeight

Sets or returns the distance between lines in a text

property listStyle

Sets or returns listStyleImage, listStylePosition, and listStyleType in one declaration

property listStyleImage

Sets or returns an image as the list-item marker

property listStylePosition

Sets or returns the position of the list-item marker

property listStyleType

Sets or returns the list-item marker type

property margin

Sets or returns the margins of an element (can have up to four values)

property marginBottom

Sets or returns the bottom margin of an element

property marginLeft

Sets or returns the left margin of an element

property marginRight

Sets or returns the right margin of an element

property marginTop

Sets or returns the top margin of an element

property maxHeight

Sets or returns the maximum height of an element

property maxWidth

Sets or returns the maximum width of an element

property minHeight

Sets or returns the minimum height of an element

property minWidth

Sets or returns the minimum width of an element

property navDown

Sets or returns where to navigate when using the arrow-down navigation key

property navIndex

Sets or returns the tabbing order for an element

property navLeft

Sets or returns where to navigate when using the arrow-left navigation key

property navRight

Sets or returns where to navigate when using the arrow-right navigation key

property navUp

Sets or returns where to navigate when using the arrow-up navigation key

property objectFit

pecifies how the contents of a replaced element should be fitted to the box established by its used height and width

property objectPosition

ecifies the alignment of the replaced element inside its box

property opacity

Sets or returns the opacity level for an element

property order

Sets or returns the order of the flexible item, relative to the rest

property orphans

Sets or returns the minimum number of lines for an element that must be left at the bottom of a page when a page break occurs inside an element

property outline

Sets or returns all the outline properties in one declaration

property outlineColor

Sets or returns the color of the outline around a element

property outlineOffset

ffsets an outline, and draws it beyond the border edge

property outlineStyle

Sets or returns the style of the outline around an element

property outlineWidth

Sets or returns the width of the outline around an element

property overflow

Sets or returns what to do with content that renders outside the element box

property overflowX

pecifies what to do with the left/right edges of the content, if it overflows the element’s content area

property overflowY

pecifies what to do with the top/bottom edges of the content, if it overflows the element’s content area

property padding

Sets or returns the padding of an element (can have up to four values)

property paddingBottom

Sets or returns the bottom padding of an element

property paddingLeft

Sets or returns the left padding of an element

property paddingRight

Sets or returns the right padding of an element

property paddingTop

Sets or returns the top padding of an element

property pageBreakAfter

Sets or returns the page-break behavior after an element

property pageBreakBefore

Sets or returns the page-break behavior before an element

property pageBreakInside

Sets or returns the page-break behavior inside an element

property perspective

Sets or returns the perspective on how 3D elements are viewed

property perspectiveOrigin

Sets or returns the bottom position of 3D elements

property position

Sets or returns the type of positioning method used for an element (static, relative, absolute or fixed)

property quotes

Sets or returns the type of quotation marks for embedded quotations

property resize

Sets or returns whether or not an element is resizable by the user

property right

Sets or returns the right position of a positioned element

property tabSize

Sets or returns the length of the tab-character

property tableLayout

Sets or returns the way to lay out table cells, rows, and columns

property textAlign

Sets or returns the horizontal alignment of text

property textAlignLast

Sets or returns how the last line of a block or a line right before a forced line break is aligned when text-align is justify

property textDecoration

Sets or returns the decoration of a text

property textDecorationColor

Sets or returns the color of the text-decoration

property textDecorationLine

Sets or returns the type of line in a text-decoration

property textDecorationStyle

Sets or returns the style of the line in a text decoration

property textIndent

Sets or returns the indentation of the first line of text

property textJustify

Sets or returns the justification method used when text-align is justify

property textOverflow

Sets or returns what should happen when text overflows the containing element

property textShadow

Sets or returns the shadow effect of a text

property textTransform

Sets or returns the capitalization of a text

property top

Sets or returns the top position of a positioned element

property transform

pplies a 2D or 3D transformation to an element

property transformOrigin

Sets or returns the position of transformed elements

property transformStyle

Sets or returns how nested elements are rendered in 3D space

property transition

shorthand property for setting or returning the four transition properties

property transitionDelay

Sets or returns when the transition effect will start

property transitionDuration

Sets or returns how many seconds or milliseconds a transition effect takes to complete

property transitionProperty

Sets or returns the CSS property that the transition effect is for

property transitionTimingFunction

Sets or returns the speed curve of the transition effect

property unicodeBidi

Sets or returns whether the text should be overridden to support multiple languages in the same document

property userSelect

Sets or returns whether the text of an element can be selected or not

property verticalAlign

Sets or returns the vertical alignment of the content in an element

property visibility

Sets or returns whether an element should be visible

property whiteSpace

Sets or returns how to handle tabs, line breaks and whitespace in a text 1

property widows

Sets or returns the minimum number of lines for an element that must be visible at the top of a page

property width

Sets or returns the width of an element

property wordBreak

Sets or returns line breaking rules for non-CJK scripts

property wordSpacing

Sets or returns the spacing between words in a text

property wordWrap

Allows long, unbreakable words to be broken and wrap to the next line

property zIndex

Sets or returns the stack order of a positioned element

class domonic.style.StyleSheet[source]

Base stylesheet object exposed through document-level style collections.

Concrete CSS sheets build on this interface with parsed rules and mutable declaration content.

class domonic.style.StyleSheetList(iterable=(), /)[source]

List-like collection returned by Document.styleSheets.

It behaves like an ordered DOM collection while still being convenient to iterate over as a Python list.

item(index: int) CSSStyleSheet | None[source]

Returns the CSSStyleSheet object at the index passed in, or null if no item exists for that index.

property length: int

Returns the number of CSSStyleSheet objects in the collection.

domonic.window

The DOM-connected Window implementation for domonic.

Be mindful that domonic has two window-shaped surfaces:

  1. domonic.javascript.Window for JavaScript-style globals and timer helpers

  2. domonic.window.Window for a browsing-context style object connected to document, history, storage, media queries, and custom elements

class domonic.window.CustomElementRegistry[source]

Registry for defining and upgrading custom elements.

Access this through window.customElements to register custom element classes, wait for definitions, and upgrade parsed trees against the registry.

define(name: str, constructor: Callable[[...], Any], options: dict[str, Any] | None = None) type[source]

Defines a new custom element.

get(name: str) type | None[source]

Returns the constructor for the named custom element, or None.

class domonic.window.MediaQueryList(media: str, *, width: int, height: int)[source]

Result object returned by Window.matchMedia().

It exposes the media query string, the current match state, and change listeners in the familiar browser style.

class domonic.window.Navigator(*args, **kwargs)[source]

Minimal browsing-environment navigator object.

property platform: str

Returns the platform

property product: str

Returns the product name

property userAgent: str

Returns the user-agent header sent by the browser Navigator

class domonic.window.Screen[source]
class domonic.window.Window[source]
property location: Location

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

domonic.utils

snippets etc

class domonic.utils.Utils[source]
static acronym(sentence: str) str[source]

[pass a sentence, returns the acronym]

Parameters:

sentence ([str]) – [typically 3 words]

Returns:

[a TLA (three letter acronym)]

Return type:

[str]

static case_camel(s: str) str[source]

case_camel(‘camel-case’) > ‘camelCase’

static case_kebab(s: str) str[source]

kebab(‘camelCase’) # ‘camel-case’

static case_snake(s: str) str[source]

snake(‘camelCase’) # ‘camel_case’

static chunk(values: Sequence[T], size: int) list[Sequence[T]][source]

chunk a list into batches

static chunks(iterable: ~typing.Iterable[~domonic.utils.T], size: int, format: ~typing.Any = <built-in function iter>) Iterator[Any][source]

Iterate over any iterable (list, set, file, stream, strings, whatever), of ANY size

static clean(lst: Iterable[T]) list[T][source]

[removes falsy values (False, None, 0 and “”) from a list ]

Parameters:

lst ([list]) – [lst to operate on]

Returns:

[a new list with falsy values removed]

Return type:

[list]

static dictify(arr: Iterable[T]) dict[T, int][source]

[turns a list into a dictionary where the list items are the keys]

Parameters:

arr ([list]) – [list to change]

Returns:

[a new dict where the list items are now the keys]

Return type:

[dict]

static digits(text: str = '') str[source]

[takes a string of mix of digits and letters and returns a string of digits]

Parameters:

text (str, optional) – [the text to change]. Defaults to ‘’.

Returns:

[a string of digits]

Return type:

[str]

static escape(s: str) str[source]

[escape a string]

Parameters:

s ([str]) – [the string to escape]

Returns:

[the escaped string]

Return type:

[str]

static frequency(data: Iterable[T]) dict[T, int][source]

[check the frequency of elements in the data]

Parameters:

data ([type]) – [the data to check]

Returns:

[a dict of elements and their frequency]

Return type:

[dict]

static get_vowels(string: str) list[str][source]

[get a list of vowels from the word]

Parameters:

string ([str]) – [the word to check]

Returns:

[a list of vowels]

Return type:

[list]

static has_internet(url: str = 'http://www.google.com/', timeout: int = 5) bool[source]

[check if you have internet connection]

Parameters:
  • url (str, optional) – [the url to check]. Defaults to ‘http://www.google.com/’.

  • timeout (int, optional) – [the timeout]. Defaults to 5.

Returns:

[True if you have internet]

Return type:

[bool]

static init_assets(dir: str = 'assets') None[source]

[creates an assets directory with nested js/css/img dirs]

Parameters:

dir (str, optional) – [default directory name]. Defaults to ‘assets’.

static is_linux() bool[source]

[check if the system is a linux]

Returns:

[description]

Return type:

[bool]

static is_mac() bool[source]

[check if the system is a mac]

Returns:

[True if the system is a mac]

Return type:

[bool]

static is_nix() bool[source]

[check if the system is a nix based system]

Returns:

[True if it is a nix based system]

Return type:

[bool]

static is_windows() bool[source]

[check if the system is a windows]

Returns:

[True if windows]

Return type:

[bool]

static merge_dictionaries(a: dict[Any, Any], b: dict[Any, Any]) dict[Any, Any][source]

[merges 2 dicts]

Parameters:
  • a ([dict]) – [dict a]

  • b ([dict]) – [dict b]

Returns:

[a new dict]

Return type:

[dict]

static permutations(word: str) list[source]

[provides all the possible permutations of a given word]

Parameters:

word ([str]) – [the word to get permutations for]

Returns:

[a list of permutations]

Return type:

[list]

static replace_between(content: str, match: str, replacement: str, start: int = 0, end: int = 0)[source]

[replace some text but only between certain indexes]

Parameters:
  • content (str) – [the content whos text you will be replacing]

  • match (str) – [the string to find]

  • replacement (str) – [the string to replace it with]

  • start (int, optional) – [start index]. Defaults to 0.

  • end (int, optional) – [end index]. Defaults to 0.

Returns:

[the new string]

Return type:

[str]

static squash(the_list: Iterable[Iterable[T]]) list[T][source]

[turns a 2d array into a flat one]

Parameters:

the_list ([list]) – [a 2d array]

Returns:

[a flattened 1d array]

Return type:

[list]

static to_dictionary(keys: Iterable[T], values: Iterable[Any]) dict[T, Any][source]

[take a list of keys and values and returns a dict]

Parameters:
  • keys ([list]) – [a list of keys]

  • values ([list]) – [a list of value]

Returns:

[a dictionary]

Return type:

[dict]

static truncate(text: str = '', length: int = 0) str[source]

[truncates a string and appends 3 dots]

Parameters:
  • text (str, optional) – [the text to truncate]. Defaults to ‘’.

  • length (int, optional) – [the max length]. Defaults to 0.

Returns:

[the truncated string]

Return type:

[str]

static unescape(s: str) str[source]

[unescape a string]

Parameters:

s ([str]) – [the string to unescape]

Returns:

[the unescaped string]

Return type:

[str]

static unique(some_arr: Iterable[T]) list[T][source]

[removes duplicates from a list]

Parameters:

some_arr ([list]) – [list containing duplicates]

Returns:

[a list containing no duplicates]

Return type:

[list]

static untitle(string: str) str[source]

[the opposite of title]

Parameters:

str ([str]) – [the string to change]

Returns:

[a string with the first character set to lowercase]

Return type:

[str]

static url2file(url: str) str[source]

[gen a safe filename from a url. by replacing ‘/’ for ‘_’ and ‘:’ for ‘__’ ]

Parameters:

url ([str]) – [the url to turn into a filename]

Returns:

[description]

Return type:

[str]

domonic.decorators

domonic.decorators.as_json(func)[source]

decorate any function to return json instead of a python obj note - used by JSON.py

domonic.decorators.called(before=None, error: Callable[[Exception], None] = None)[source]

Call a hook before a function runs, with light support for legacy callback sugar.

domonic.decorators.check(f)[source]

Log entry and exit around a function call.

domonic.decorators.deprecated(func)[source]

marks a function as deprecated.

domonic.decorators.el(element='div', string: bool = False)[source]

[wraps the results of a function in an element]

domonic.decorators.iife(before=None, error: Callable[[Exception], None] = None)

Call a hook before a function runs, with light support for legacy callback sugar.

domonic.decorators.instead(somethingelse)[source]

Return a fallback value when the wrapped function raises.

domonic.decorators.log(logger, level='info')[source]

@log(logging.getLogger(‘main’), level=’warning’)

domonic.decorators.silence(*args, **kwargs)[source]

Suppress stdout for the wrapped function.

Supports both @silence and @silence().

domonic.svg

SVG tag constructors and SVG-aware DOM elements for domonic.

The SVG surface is designed to participate in the same tree, event, and rendering model as the rest of the library rather than living in a separate mini-framework.

class domonic.svg.SVGElement(*args: Any, **kwargs: Any)[source]

Base SVG element that keeps the SVG namespace on direct constructors.

class domonic.svg.altGlyph(*args: Any, **kwargs: Any)
class domonic.svg.altGlyphDef(*args: Any, **kwargs: Any)
class domonic.svg.altGlyphItem(*args: Any, **kwargs: Any)
class domonic.svg.animate(*args: Any, **kwargs: Any)
class domonic.svg.animateColor(*args: Any, **kwargs: Any)
class domonic.svg.animateMotion(*args: Any, **kwargs: Any)
class domonic.svg.animateTransform(*args: Any, **kwargs: Any)
class domonic.svg.circle(*args: Any, **kwargs: Any)
class domonic.svg.clipPath(*args: Any, **kwargs: Any)
domonic.svg.create_element(name: str = 'custom_svg_tag', *args: Any, **kwargs: Any) Element[source]

A method for creating SVG tags, including custom or hyphenated ones.

class domonic.svg.cursor(*args: Any, **kwargs: Any)
class domonic.svg.defs(*args: Any, **kwargs: Any)
class domonic.svg.desc(*args: Any, **kwargs: Any)
class domonic.svg.discard(*args: Any, **kwargs: Any)
class domonic.svg.ellipse(*args: Any, **kwargs: Any)
class domonic.svg.feBlend(*args: Any, **kwargs: Any)
class domonic.svg.feColorMatrix(*args: Any, **kwargs: Any)
class domonic.svg.feComponentTransfer(*args: Any, **kwargs: Any)
class domonic.svg.feComposite(*args: Any, **kwargs: Any)
class domonic.svg.feConvolveMatrix(*args: Any, **kwargs: Any)
class domonic.svg.feDiffuseLighting(*args: Any, **kwargs: Any)
class domonic.svg.feDisplacementMap(*args: Any, **kwargs: Any)
class domonic.svg.feDistantLight(*args: Any, **kwargs: Any)
class domonic.svg.feDropShadow(*args: Any, **kwargs: Any)
class domonic.svg.feFlood(*args: Any, **kwargs: Any)
class domonic.svg.feFuncA(*args: Any, **kwargs: Any)
class domonic.svg.feFuncB(*args: Any, **kwargs: Any)
class domonic.svg.feFuncG(*args: Any, **kwargs: Any)
class domonic.svg.feFuncR(*args: Any, **kwargs: Any)
class domonic.svg.feGaussianBlur(*args: Any, **kwargs: Any)
class domonic.svg.feImage(*args: Any, **kwargs: Any)
class domonic.svg.feMerge(*args: Any, **kwargs: Any)
class domonic.svg.feMergeNode(*args: Any, **kwargs: Any)
class domonic.svg.feMorphology(*args: Any, **kwargs: Any)
class domonic.svg.feOffset(*args: Any, **kwargs: Any)
class domonic.svg.fePointLight(*args: Any, **kwargs: Any)
class domonic.svg.feSpecularLighting(*args: Any, **kwargs: Any)
class domonic.svg.feSpotLight(*args: Any, **kwargs: Any)
class domonic.svg.feTile(*args: Any, **kwargs: Any)
class domonic.svg.feTurbulence(*args: Any, **kwargs: Any)
class domonic.svg.filter(*args: Any, **kwargs: Any)
class domonic.svg.font(*args: Any, **kwargs: Any)
class domonic.svg.foreignObject(*args: Any, **kwargs: Any)
class domonic.svg.g(*args: Any, **kwargs: Any)
class domonic.svg.glyph(*args: Any, **kwargs: Any)
class domonic.svg.glyphRef(*args: Any, **kwargs: Any)
class domonic.svg.hatch(*args: Any, **kwargs: Any)
class domonic.svg.hatchpath(*args: Any, **kwargs: Any)
class domonic.svg.hkern(*args: Any, **kwargs: Any)
class domonic.svg.image(*args: Any, **kwargs: Any)
class domonic.svg.line(*args: Any, **kwargs: Any)
class domonic.svg.linearGradient(*args: Any, **kwargs: Any)
class domonic.svg.marker(*args: Any, **kwargs: Any)
class domonic.svg.mask(*args: Any, **kwargs: Any)
class domonic.svg.metadata(*args: Any, **kwargs: Any)
class domonic.svg.missing_glyph(*args: Any, **kwargs: Any)
class domonic.svg.mpath(*args: Any, **kwargs: Any)
class domonic.svg.path(*args: Any, **kwargs: Any)
class domonic.svg.pattern(*args: Any, **kwargs: Any)
class domonic.svg.polygon(*args: Any, **kwargs: Any)
class domonic.svg.polyline(*args: Any, **kwargs: Any)
class domonic.svg.radialGradient(*args: Any, **kwargs: Any)
class domonic.svg.rect(*args: Any, **kwargs: Any)
class domonic.svg.solidcolor(*args: Any, **kwargs: Any)
class domonic.svg.stop(*args: Any, **kwargs: Any)
class domonic.svg.svg(*args: Any, **kwargs: Any)
class domonic.svg.switch(*args: Any, **kwargs: Any)
class domonic.svg.symbol(*args: Any, **kwargs: Any)
class domonic.svg.text(*args: Any, **kwargs: Any)
class domonic.svg.textPath(*args: Any, **kwargs: Any)
class domonic.svg.title(*args: Any, **kwargs: Any)
class domonic.svg.tref(*args: Any, **kwargs: Any)
class domonic.svg.tspan(*args: Any, **kwargs: Any)
class domonic.svg.unknown(*args: Any, **kwargs: Any)
class domonic.svg.use(*args: Any, **kwargs: Any)
class domonic.svg.view(*args: Any, **kwargs: Any)
class domonic.svg.vkern(*args: Any, **kwargs: Any)
class domonic.lerpy.tween.Tween(target=None, values=None, duration=0, equations=None, delay=0, loop=False)[source]

Tween is a complex lerp but you don’t have do the math cos robert penner did already. Just pass an easing equation from the easing package

i.e

twn = Tween(someObj, { ‘x’:10, ‘y’:5, ‘z’:3}, 6, Linear.easeIn )

will tween the objects properties over the given time using Linear.easeIn

pause()[source]

Pauses the tween from changing the values

unpause()[source]

unpauses the tween

domonic.x3d

Generate x3d with python 3

class domonic.xml.x3d.Anchor(*args, **kwargs)
domonic.xml.x3d.Appearance

alias of appearance

class domonic.xml.x3d.Arc2D(*args, **kwargs)
class domonic.xml.x3d.ArcClose2D(*args, **kwargs)
class domonic.xml.x3d.AudioClip(*args, **kwargs)
class domonic.xml.x3d.Background(*args, **kwargs)
class domonic.xml.x3d.BallJoint(*args, **kwargs)
class domonic.xml.x3d.Billboard(*args, **kwargs)
class domonic.xml.x3d.BinaryGeometry(*args, **kwargs)
class domonic.xml.x3d.BlendMode(*args, **kwargs)
class domonic.xml.x3d.BlendedVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Block(*args, **kwargs)
class domonic.xml.x3d.BoundaryEnhancementVolumeStyle(*args, **kwargs)
domonic.xml.x3d.Box

alias of box

class domonic.xml.x3d.BufferAccessor(*args, **kwargs)
class domonic.xml.x3d.BufferGeometry(*args, **kwargs)
class domonic.xml.x3d.BufferView(*args, **kwargs)
class domonic.xml.x3d.CADAssembly(*args, **kwargs)
class domonic.xml.x3d.CADFace(*args, **kwargs)
class domonic.xml.x3d.CADLayer(*args, **kwargs)
class domonic.xml.x3d.CADPart(*args, **kwargs)
class domonic.xml.x3d.CartoonVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Circle2D(*args, **kwargs)
class domonic.xml.x3d.ClipPlane(*args, **kwargs)
class domonic.xml.x3d.CollidableShape(*args, **kwargs)
class domonic.xml.x3d.Collision(*args, **kwargs)
class domonic.xml.x3d.CollisionCollection(*args, **kwargs)
class domonic.xml.x3d.CollisionSensor(*args, **kwargs)
class domonic.xml.x3d.Color(*args, **kwargs)
class domonic.xml.x3d.ColorChaser(*args, **kwargs)
class domonic.xml.x3d.ColorDamper(*args, **kwargs)
class domonic.xml.x3d.ColorInterpolator(*args, **kwargs)
class domonic.xml.x3d.ColorMaskMode(*args, **kwargs)
class domonic.xml.x3d.ColorRGBA(*args, **kwargs)
class domonic.xml.x3d.CommonSurfaceShader(*args, **kwargs)
class domonic.xml.x3d.ComposedCubeMapTexture(*args, **kwargs)
class domonic.xml.x3d.ComposedShader(*args, **kwargs)
class domonic.xml.x3d.ComposedTexture3D(*args, **kwargs)
class domonic.xml.x3d.ComposedVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Cone(*args, **kwargs)
class domonic.xml.x3d.Coordinate(*args, **kwargs)
class domonic.xml.x3d.CoordinateDamper(*args, **kwargs)
class domonic.xml.x3d.CoordinateDouble(*args, **kwargs)
class domonic.xml.x3d.CoordinateInterpolator(*args, **kwargs)
class domonic.xml.x3d.Cylinder(*args, **kwargs)
class domonic.xml.x3d.CylinderSensor(*args, **kwargs)
class domonic.xml.x3d.DepthMode(*args, **kwargs)
class domonic.xml.x3d.DirectionalLight(*args, **kwargs)
class domonic.xml.x3d.Dish(*args, **kwargs)
class domonic.xml.x3d.Disk2D(*args, **kwargs)
class domonic.xml.x3d.DoubleAxisHingeJoint(*args, **kwargs)
class domonic.xml.x3d.DynamicLOD(*args, **kwargs)
class domonic.xml.x3d.EdgeEnhancementVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.ElevationGrid(*args, **kwargs)
class domonic.xml.x3d.Environment(*args, **kwargs)
class domonic.xml.x3d.Extrusion(*args, **kwargs)
class domonic.xml.x3d.Field(*args, **kwargs)
class domonic.xml.x3d.FloatVertexAttribute(*args, **kwargs)
class domonic.xml.x3d.Fog(*args, **kwargs)
class domonic.xml.x3d.FontStyle(*args, **kwargs)
class domonic.xml.x3d.GeneratedCubeMapTexture(*args, **kwargs)
class domonic.xml.x3d.GeoCoordinate(*args, **kwargs)
class domonic.xml.x3d.GeoElevationGrid(*args, **kwargs)
class domonic.xml.x3d.GeoLOD(*args, **kwargs)
class domonic.xml.x3d.GeoLocation(*args, **kwargs)
class domonic.xml.x3d.GeoMetadata(*args, **kwargs)
class domonic.xml.x3d.GeoOrigin(*args, **kwargs)
class domonic.xml.x3d.GeoPositionInterpolator(*args, **kwargs)
class domonic.xml.x3d.GeoTransform(*args, **kwargs)
class domonic.xml.x3d.GeoViewpoint(*args, **kwargs)
class domonic.xml.x3d.Group(*args, **kwargs)
class domonic.xml.x3d.HAnimDisplacer(*args, **kwargs)
class domonic.xml.x3d.HAnimHumanoid(*args, **kwargs)
class domonic.xml.x3d.HAnimJoint(*args, **kwargs)
class domonic.xml.x3d.HAnimSegment(*args, **kwargs)
class domonic.xml.x3d.HAnimSite(*args, **kwargs)
class domonic.xml.x3d.ImageTexture(*args, **kwargs)
class domonic.xml.x3d.ImageTexture3D(*args, **kwargs)
class domonic.xml.x3d.ImageTextureAtlas(*args, **kwargs)
class domonic.xml.x3d.IndexedFaceSet(*args, **kwargs)
class domonic.xml.x3d.IndexedLineSet(*args, **kwargs)
class domonic.xml.x3d.IndexedQuadSet(*args, **kwargs)
class domonic.xml.x3d.IndexedTriangleSet(*args, **kwargs)
class domonic.xml.x3d.IndexedTriangleStripSet(*args, **kwargs)
domonic.xml.x3d.Inline

alias of inline

class domonic.xml.x3d.IsoSurfaceVolumeData(*args, **kwargs)
class domonic.xml.x3d.LOD(*args, **kwargs)
class domonic.xml.x3d.LineProperties(*args, **kwargs)
class domonic.xml.x3d.LineSet(*args, **kwargs)
class domonic.xml.x3d.MPRPlane(*args, **kwargs)
class domonic.xml.x3d.MPRVolumeStyle(*args, **kwargs)
domonic.xml.x3d.Material

alias of material

class domonic.xml.x3d.MatrixTextureTransform(*args, **kwargs)
class domonic.xml.x3d.MatrixTransform(*args, **kwargs)
class domonic.xml.x3d.Mesh(*args, **kwargs)
class domonic.xml.x3d.MetadataBoolean(*args, **kwargs)
class domonic.xml.x3d.MetadataDouble(*args, **kwargs)
class domonic.xml.x3d.MetadataFloat(*args, **kwargs)
class domonic.xml.x3d.MetadataInteger(*args, **kwargs)
class domonic.xml.x3d.MetadataSet(*args, **kwargs)
class domonic.xml.x3d.MetadataString(*args, **kwargs)
class domonic.xml.x3d.MotorJoint(*args, **kwargs)
class domonic.xml.x3d.MovieTexture(*args, **kwargs)
class domonic.xml.x3d.MultiTexture(*args, **kwargs)
class domonic.xml.x3d.MultiTextureCoordinate(*args, **kwargs)
class domonic.xml.x3d.NavigationInfo(*args, **kwargs)
class domonic.xml.x3d.Normal(*args, **kwargs)
class domonic.xml.x3d.NormalInterpolator(*args, **kwargs)
class domonic.xml.x3d.Nozzle(*args, **kwargs)
class domonic.xml.x3d.OpacityMapVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.OrientationChaser(*args, **kwargs)
class domonic.xml.x3d.OrientationDamper(*args, **kwargs)
class domonic.xml.x3d.OrientationInterpolator(*args, **kwargs)
class domonic.xml.x3d.OrthoViewpoint(*args, **kwargs)
class domonic.xml.x3d.Param(*args, **kwargs)
class domonic.xml.x3d.ParticleSet(*args, **kwargs)
class domonic.xml.x3d.PhysicalEnvironmentLight(*args, **kwargs)
class domonic.xml.x3d.PhysicalMaterial(*args, **kwargs)
class domonic.xml.x3d.PixelTexture(*args, **kwargs)
class domonic.xml.x3d.PixelTexture3D(*args, **kwargs)
domonic.xml.x3d.Plane

alias of plane

class domonic.xml.x3d.PlaneSensor(*args, **kwargs)
class domonic.xml.x3d.PointLight(*args, **kwargs)
class domonic.xml.x3d.PointSet(*args, **kwargs)
class domonic.xml.x3d.Polyline2D(*args, **kwargs)
class domonic.xml.x3d.Polypoint2D(*args, **kwargs)
class domonic.xml.x3d.PopGeometry(*args, **kwargs)
class domonic.xml.x3d.PopGeometryLevel(*args, **kwargs)
class domonic.xml.x3d.PositionChaser(*args, **kwargs)
class domonic.xml.x3d.PositionChaser2D(*args, **kwargs)
class domonic.xml.x3d.PositionDamper(*args, **kwargs)
class domonic.xml.x3d.PositionDamper2D(*args, **kwargs)
class domonic.xml.x3d.PositionInterpolator(*args, **kwargs)
class domonic.xml.x3d.PositionInterpolator2D(*args, **kwargs)
class domonic.xml.x3d.ProjectionVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Pyramid(*args, **kwargs)
class domonic.xml.x3d.QuadSet(*args, **kwargs)
class domonic.xml.x3d.RadarVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Rectangle2D(*args, **kwargs)
class domonic.xml.x3d.RectangularTorus(*args, **kwargs)
class domonic.xml.x3d.RefinementTexture(*args, **kwargs)
class domonic.xml.x3d.RemoteSelectionGroup(*args, **kwargs)
class domonic.xml.x3d.RenderedTexture(*args, **kwargs)
class domonic.xml.x3d.RigidBody(*args, **kwargs)
class domonic.xml.x3d.RigidBodyCollection(*args, **kwargs)
class domonic.xml.x3d.Route(*args, **kwargs)
class domonic.xml.x3d.ScalarChaser(*args, **kwargs)
class domonic.xml.x3d.ScalarDamper(*args, **kwargs)
class domonic.xml.x3d.ScalarInterpolator(*args, **kwargs)
domonic.xml.x3d.Scene

alias of scene

class domonic.xml.x3d.SegmentedVolumeData(*args, **kwargs)
class domonic.xml.x3d.ShadedVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.ShaderPart(*args, **kwargs)
domonic.xml.x3d.Shape

alias of shape

class domonic.xml.x3d.SilhouetteEnhancementVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.SingleAxisHingeJoint(*args, **kwargs)
class domonic.xml.x3d.SliderJoint(*args, **kwargs)
class domonic.xml.x3d.SlopedCylinder(*args, **kwargs)
class domonic.xml.x3d.Snout(*args, **kwargs)
class domonic.xml.x3d.SolidOfRevolution(*args, **kwargs)
class domonic.xml.x3d.Sound(*args, **kwargs)
domonic.xml.x3d.Sphere

alias of sphere

class domonic.xml.x3d.SphereSegment(*args, **kwargs)
class domonic.xml.x3d.SphereSensor(*args, **kwargs)
class domonic.xml.x3d.SplinePositionInterpolator(*args, **kwargs)
class domonic.xml.x3d.SpotLight(*args, **kwargs)
class domonic.xml.x3d.StaticGroup(*args, **kwargs)
class domonic.xml.x3d.StippleVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.SurfaceShaderTexture(*args, **kwargs)
class domonic.xml.x3d.Switch(*args, **kwargs)
class domonic.xml.x3d.TexCoordDamper2D(*args, **kwargs)
class domonic.xml.x3d.Text(*args, **kwargs)
class domonic.xml.x3d.Texture(*args, **kwargs)
class domonic.xml.x3d.TextureCoordinate(*args, **kwargs)
class domonic.xml.x3d.TextureCoordinate3D(*args, **kwargs)
class domonic.xml.x3d.TextureCoordinateGenerator(*args, **kwargs)
class domonic.xml.x3d.TextureProperties(*args, **kwargs)
class domonic.xml.x3d.TextureTransform(*args, **kwargs)
class domonic.xml.x3d.TextureTransform3D(*args, **kwargs)
class domonic.xml.x3d.TextureTransformMatrix3D(*args, **kwargs)
domonic.xml.x3d.TimeSensor

alias of timeSensor

class domonic.xml.x3d.ToneMappedVolumeStyle(*args, **kwargs)
class domonic.xml.x3d.Torus(*args, **kwargs)
class domonic.xml.x3d.TouchSensor(*args, **kwargs)
domonic.xml.x3d.Transform

alias of transform

class domonic.xml.x3d.TriangleSet(*args, **kwargs)
class domonic.xml.x3d.TriangleSet2D(*args, **kwargs)
class domonic.xml.x3d.TwoSidedMaterial(*args, **kwargs)
class domonic.xml.x3d.Uniform(*args, **kwargs)
class domonic.xml.x3d.UniversalJoint(*args, **kwargs)
class domonic.xml.x3d.Viewfrustum(*args, **kwargs)
class domonic.xml.x3d.Viewpoint(*args, **kwargs)
class domonic.xml.x3d.VolumeData(*args, **kwargs)
class domonic.xml.x3d.WorldInfo(*args, **kwargs)
domonic.xml.x3d.X3D

alias of x3d

class domonic.xml.x3d.X3DAppearanceChildNode(*args, **kwargs)
class domonic.xml.x3d.X3DAppearanceNode(*args, **kwargs)
class domonic.xml.x3d.X3DBackgroundNode(*args, **kwargs)
class domonic.xml.x3d.X3DBinaryContainerGeometryNode(*args, **kwargs)
class domonic.xml.x3d.X3DBindableNode(*args, **kwargs)
class domonic.xml.x3d.X3DBoundedObject(*args, **kwargs)
class domonic.xml.x3d.X3DChaserNode(*args, **kwargs)
class domonic.xml.x3d.X3DChildNode(*args, **kwargs)
class domonic.xml.x3d.X3DColorNode(*args, **kwargs)
class domonic.xml.x3d.X3DComposableVolumeRenderStyleNode(*args, **kwargs)
class domonic.xml.x3d.X3DComposedGeometryNode(*args, **kwargs)
class domonic.xml.x3d.X3DCoordinateNode(*args, **kwargs)
class domonic.xml.x3d.X3DDamperNode(*args, **kwargs)
class domonic.xml.x3d.X3DDragSensorNode(*args, **kwargs)
class domonic.xml.x3d.X3DEnvironmentNode(*args, **kwargs)
class domonic.xml.x3d.X3DEnvironmentTextureNode(*args, **kwargs)
class domonic.xml.x3d.X3DFogNode(*args, **kwargs)
class domonic.xml.x3d.X3DFollowerNode(*args, **kwargs)
class domonic.xml.x3d.X3DFontStyleNode(*args, **kwargs)
class domonic.xml.x3d.X3DGeometricPropertyNode(*args, **kwargs)
class domonic.xml.x3d.X3DGeometryNode(*args, **kwargs)
class domonic.xml.x3d.X3DGroupingNode(*args, **kwargs)
class domonic.xml.x3d.X3DInfoNode(*args, **kwargs)
class domonic.xml.x3d.X3DInterpolatorNode(*args, **kwargs)
class domonic.xml.x3d.X3DLODNode(*args, **kwargs)
class domonic.xml.x3d.X3DLightNode(*args, **kwargs)
class domonic.xml.x3d.X3DMaterialNode(*args, **kwargs)
class domonic.xml.x3d.X3DMetadataObject(*args, **kwargs)
class domonic.xml.x3d.X3DNBodyCollidableNode(*args, **kwargs)
class domonic.xml.x3d.X3DNavigationInfoNode(*args, **kwargs)
class domonic.xml.x3d.X3DNode(*args, **kwargs)
class domonic.xml.x3d.X3DPlanarGeometryNode(*args, **kwargs)
class domonic.xml.x3d.X3DPointingDeviceSensorNode(*args, **kwargs)
class domonic.xml.x3d.X3DRigidJointNode(*args, **kwargs)
class domonic.xml.x3d.X3DSensorNode(*args, **kwargs)
class domonic.xml.x3d.X3DShaderNode(*args, **kwargs)
class domonic.xml.x3d.X3DShapeNode(*args, **kwargs)
class domonic.xml.x3d.X3DSoundNode(*args, **kwargs)
class domonic.xml.x3d.X3DSoundSourceNode(*args, **kwargs)
class domonic.xml.x3d.X3DSpatialGeometryNode(*args, **kwargs)
class domonic.xml.x3d.X3DTexture3DNode(*args, **kwargs)
class domonic.xml.x3d.X3DTextureCoordinateNode(*args, **kwargs)
class domonic.xml.x3d.X3DTextureNode(*args, **kwargs)
class domonic.xml.x3d.X3DTextureTransformNode(*args, **kwargs)
class domonic.xml.x3d.X3DTimeDependentNode(*args, **kwargs)
class domonic.xml.x3d.X3DTouchSensorNode(*args, **kwargs)
class domonic.xml.x3d.X3DTransformNode(*args, **kwargs)
class domonic.xml.x3d.X3DVertexAttributeNode(*args, **kwargs)
class domonic.xml.x3d.X3DViewpointNode(*args, **kwargs)
class domonic.xml.x3d.X3DVolumeDataNode(*args, **kwargs)
class domonic.xml.x3d.X3DVolumeRenderStyleNode(*args, **kwargs)
domonic.xml.x3d.anchor

alias of Anchor

class domonic.xml.x3d.appearance(*args, **kwargs)
domonic.xml.x3d.arc2D

alias of Arc2D

domonic.xml.x3d.arcClose2D

alias of ArcClose2D

domonic.xml.x3d.audioClip

alias of AudioClip

domonic.xml.x3d.background

alias of Background

domonic.xml.x3d.ballJoint

alias of BallJoint

domonic.xml.x3d.billboard

alias of Billboard

domonic.xml.x3d.binaryGeometry

alias of BinaryGeometry

domonic.xml.x3d.blendMode

alias of BlendMode

domonic.xml.x3d.blendedVolumeStyle

alias of BlendedVolumeStyle

domonic.xml.x3d.block

alias of Block

domonic.xml.x3d.boundaryEnhancementVolumeStyle

alias of BoundaryEnhancementVolumeStyle

class domonic.xml.x3d.box(*args, **kwargs)
domonic.xml.x3d.bufferAccessor

alias of BufferAccessor

domonic.xml.x3d.bufferGeometry

alias of BufferGeometry

domonic.xml.x3d.bufferView

alias of BufferView

domonic.xml.x3d.cADAssembly

alias of CADAssembly

domonic.xml.x3d.cADFace

alias of CADFace

domonic.xml.x3d.cADLayer

alias of CADLayer

domonic.xml.x3d.cADPart

alias of CADPart

domonic.xml.x3d.cartoonVolumeStyle

alias of CartoonVolumeStyle

domonic.xml.x3d.circle2D

alias of Circle2D

domonic.xml.x3d.clipPlane

alias of ClipPlane

domonic.xml.x3d.collidableShape

alias of CollidableShape

domonic.xml.x3d.collision

alias of Collision

domonic.xml.x3d.collisionCollection

alias of CollisionCollection

domonic.xml.x3d.collisionSensor

alias of CollisionSensor

domonic.xml.x3d.color

alias of Color

domonic.xml.x3d.colorChaser

alias of ColorChaser

domonic.xml.x3d.colorDamper

alias of ColorDamper

domonic.xml.x3d.colorInterpolator

alias of ColorInterpolator

domonic.xml.x3d.colorMaskMode

alias of ColorMaskMode

domonic.xml.x3d.colorRGBA

alias of ColorRGBA

domonic.xml.x3d.commonSurfaceShader

alias of CommonSurfaceShader

domonic.xml.x3d.composedCubeMapTexture

alias of ComposedCubeMapTexture

domonic.xml.x3d.composedShader

alias of ComposedShader

domonic.xml.x3d.composedTexture3D

alias of ComposedTexture3D

domonic.xml.x3d.composedVolumeStyle

alias of ComposedVolumeStyle

domonic.xml.x3d.cone

alias of Cone

domonic.xml.x3d.coordinate

alias of Coordinate

domonic.xml.x3d.coordinateDamper

alias of CoordinateDamper

domonic.xml.x3d.coordinateDouble

alias of CoordinateDouble

domonic.xml.x3d.coordinateInterpolator

alias of CoordinateInterpolator

domonic.xml.x3d.cylinder

alias of Cylinder

domonic.xml.x3d.cylinderSensor

alias of CylinderSensor

domonic.xml.x3d.depthMode

alias of DepthMode

domonic.xml.x3d.directionalLight

alias of DirectionalLight

domonic.xml.x3d.dish

alias of Dish

domonic.xml.x3d.disk2D

alias of Disk2D

domonic.xml.x3d.doubleAxisHingeJoint

alias of DoubleAxisHingeJoint

domonic.xml.x3d.dynamicLOD

alias of DynamicLOD

domonic.xml.x3d.edgeEnhancementVolumeStyle

alias of EdgeEnhancementVolumeStyle

domonic.xml.x3d.elevationGrid

alias of ElevationGrid

domonic.xml.x3d.environment

alias of Environment

domonic.xml.x3d.extrusion

alias of Extrusion

domonic.xml.x3d.field

alias of Field

domonic.xml.x3d.floatVertexAttribute

alias of FloatVertexAttribute

domonic.xml.x3d.fog

alias of Fog

domonic.xml.x3d.fontStyle

alias of FontStyle

domonic.xml.x3d.generatedCubeMapTexture

alias of GeneratedCubeMapTexture

domonic.xml.x3d.geoCoordinate

alias of GeoCoordinate

domonic.xml.x3d.geoElevationGrid

alias of GeoElevationGrid

domonic.xml.x3d.geoLOD

alias of GeoLOD

domonic.xml.x3d.geoLocation

alias of GeoLocation

domonic.xml.x3d.geoMetadata

alias of GeoMetadata

domonic.xml.x3d.geoOrigin

alias of GeoOrigin

domonic.xml.x3d.geoPositionInterpolator

alias of GeoPositionInterpolator

domonic.xml.x3d.geoTransform

alias of GeoTransform

domonic.xml.x3d.geoViewpoint

alias of GeoViewpoint

domonic.xml.x3d.group

alias of Group

domonic.xml.x3d.hAnimDisplacer

alias of HAnimDisplacer

domonic.xml.x3d.hAnimHumanoid

alias of HAnimHumanoid

domonic.xml.x3d.hAnimJoint

alias of HAnimJoint

domonic.xml.x3d.hAnimSegment

alias of HAnimSegment

domonic.xml.x3d.hAnimSite

alias of HAnimSite

domonic.xml.x3d.imageTexture

alias of ImageTexture

domonic.xml.x3d.imageTexture3D

alias of ImageTexture3D

domonic.xml.x3d.imageTextureAtlas

alias of ImageTextureAtlas

domonic.xml.x3d.indexedFaceSet

alias of IndexedFaceSet

domonic.xml.x3d.indexedLineSet

alias of IndexedLineSet

domonic.xml.x3d.indexedQuadSet

alias of IndexedQuadSet

domonic.xml.x3d.indexedTriangleSet

alias of IndexedTriangleSet

domonic.xml.x3d.indexedTriangleStripSet

alias of IndexedTriangleStripSet

class domonic.xml.x3d.inline(*args, **kwargs)
domonic.xml.x3d.isoSurfaceVolumeData

alias of IsoSurfaceVolumeData

domonic.xml.x3d.lOD

alias of LOD

domonic.xml.x3d.lineProperties

alias of LineProperties

domonic.xml.x3d.lineSet

alias of LineSet

domonic.xml.x3d.mPRPlane

alias of MPRPlane

domonic.xml.x3d.mPRVolumeStyle

alias of MPRVolumeStyle

class domonic.xml.x3d.material(*args, **kwargs)
domonic.xml.x3d.matrixTextureTransform

alias of MatrixTextureTransform

domonic.xml.x3d.matrixTransform

alias of MatrixTransform

domonic.xml.x3d.mesh

alias of Mesh

domonic.xml.x3d.metadataBoolean

alias of MetadataBoolean

domonic.xml.x3d.metadataDouble

alias of MetadataDouble

domonic.xml.x3d.metadataFloat

alias of MetadataFloat

domonic.xml.x3d.metadataInteger

alias of MetadataInteger

domonic.xml.x3d.metadataSet

alias of MetadataSet

domonic.xml.x3d.metadataString

alias of MetadataString

domonic.xml.x3d.motorJoint

alias of MotorJoint

domonic.xml.x3d.movieTexture

alias of MovieTexture

domonic.xml.x3d.multiTexture

alias of MultiTexture

domonic.xml.x3d.multiTextureCoordinate

alias of MultiTextureCoordinate

domonic.xml.x3d.navigationInfo

alias of NavigationInfo

domonic.xml.x3d.normal

alias of Normal

domonic.xml.x3d.normalInterpolator

alias of NormalInterpolator

domonic.xml.x3d.nozzle

alias of Nozzle

domonic.xml.x3d.opacityMapVolumeStyle

alias of OpacityMapVolumeStyle

domonic.xml.x3d.orientationChaser

alias of OrientationChaser

domonic.xml.x3d.orientationDamper

alias of OrientationDamper

domonic.xml.x3d.orientationInterpolator

alias of OrientationInterpolator

domonic.xml.x3d.orthoViewpoint

alias of OrthoViewpoint

domonic.xml.x3d.param

alias of Param

domonic.xml.x3d.particleSet

alias of ParticleSet

domonic.xml.x3d.physicalEnvironmentLight

alias of PhysicalEnvironmentLight

domonic.xml.x3d.physicalMaterial

alias of PhysicalMaterial

domonic.xml.x3d.pixelTexture

alias of PixelTexture

domonic.xml.x3d.pixelTexture3D

alias of PixelTexture3D

class domonic.xml.x3d.plane(*args, **kwargs)
domonic.xml.x3d.planeSensor

alias of PlaneSensor

domonic.xml.x3d.pointLight

alias of PointLight

domonic.xml.x3d.pointSet

alias of PointSet

domonic.xml.x3d.polyline2D

alias of Polyline2D

domonic.xml.x3d.polypoint2D

alias of Polypoint2D

domonic.xml.x3d.popGeometry

alias of PopGeometry

domonic.xml.x3d.popGeometryLevel

alias of PopGeometryLevel

domonic.xml.x3d.positionChaser

alias of PositionChaser

domonic.xml.x3d.positionChaser2D

alias of PositionChaser2D

domonic.xml.x3d.positionDamper

alias of PositionDamper

domonic.xml.x3d.positionDamper2D

alias of PositionDamper2D

domonic.xml.x3d.positionInterpolator

alias of PositionInterpolator

domonic.xml.x3d.positionInterpolator2D

alias of PositionInterpolator2D

domonic.xml.x3d.projectionVolumeStyle

alias of ProjectionVolumeStyle

domonic.xml.x3d.pyramid

alias of Pyramid

domonic.xml.x3d.quadSet

alias of QuadSet

domonic.xml.x3d.radarVolumeStyle

alias of RadarVolumeStyle

domonic.xml.x3d.rectangle2D

alias of Rectangle2D

domonic.xml.x3d.rectangularTorus

alias of RectangularTorus

domonic.xml.x3d.refinementTexture

alias of RefinementTexture

domonic.xml.x3d.remoteSelectionGroup

alias of RemoteSelectionGroup

domonic.xml.x3d.renderedTexture

alias of RenderedTexture

domonic.xml.x3d.rigidBody

alias of RigidBody

domonic.xml.x3d.rigidBodyCollection

alias of RigidBodyCollection

domonic.xml.x3d.route

alias of Route

domonic.xml.x3d.scalarChaser

alias of ScalarChaser

domonic.xml.x3d.scalarDamper

alias of ScalarDamper

domonic.xml.x3d.scalarInterpolator

alias of ScalarInterpolator

class domonic.xml.x3d.scene(*args, **kwargs)
domonic.xml.x3d.segmentedVolumeData

alias of SegmentedVolumeData

domonic.xml.x3d.shadedVolumeStyle

alias of ShadedVolumeStyle

domonic.xml.x3d.shaderPart

alias of ShaderPart

class domonic.xml.x3d.shape(*args, **kwargs)
domonic.xml.x3d.silhouetteEnhancementVolumeStyle

alias of SilhouetteEnhancementVolumeStyle

domonic.xml.x3d.singleAxisHingeJoint

alias of SingleAxisHingeJoint

domonic.xml.x3d.sliderJoint

alias of SliderJoint

domonic.xml.x3d.slopedCylinder

alias of SlopedCylinder

domonic.xml.x3d.snout

alias of Snout

domonic.xml.x3d.solidOfRevolution

alias of SolidOfRevolution

domonic.xml.x3d.sound

alias of Sound

class domonic.xml.x3d.sphere(*args, **kwargs)
domonic.xml.x3d.sphereSegment

alias of SphereSegment

domonic.xml.x3d.sphereSensor

alias of SphereSensor

domonic.xml.x3d.splinePositionInterpolator

alias of SplinePositionInterpolator

domonic.xml.x3d.spotLight

alias of SpotLight

domonic.xml.x3d.staticGroup

alias of StaticGroup

domonic.xml.x3d.stippleVolumeStyle

alias of StippleVolumeStyle

domonic.xml.x3d.surfaceShaderTexture

alias of SurfaceShaderTexture

domonic.xml.x3d.switch

alias of Switch

domonic.xml.x3d.texCoordDamper2D

alias of TexCoordDamper2D

domonic.xml.x3d.text

alias of Text

domonic.xml.x3d.texture

alias of Texture

domonic.xml.x3d.textureCoordinate

alias of TextureCoordinate

domonic.xml.x3d.textureCoordinate3D

alias of TextureCoordinate3D

domonic.xml.x3d.textureCoordinateGenerator

alias of TextureCoordinateGenerator

domonic.xml.x3d.textureProperties

alias of TextureProperties

domonic.xml.x3d.textureTransform

alias of TextureTransform

domonic.xml.x3d.textureTransform3D

alias of TextureTransform3D

domonic.xml.x3d.textureTransformMatrix3D

alias of TextureTransformMatrix3D

class domonic.xml.x3d.timeSensor(*args, **kwargs)
domonic.xml.x3d.toneMappedVolumeStyle

alias of ToneMappedVolumeStyle

domonic.xml.x3d.torus

alias of Torus

domonic.xml.x3d.touchSensor

alias of TouchSensor

class domonic.xml.x3d.transform(*args, **kwargs)
domonic.xml.x3d.triangleSet

alias of TriangleSet

domonic.xml.x3d.triangleSet2D

alias of TriangleSet2D

domonic.xml.x3d.twoSidedMaterial

alias of TwoSidedMaterial

domonic.xml.x3d.uniform

alias of Uniform

domonic.xml.x3d.universalJoint

alias of UniversalJoint

domonic.xml.x3d.viewfrustum

alias of Viewfrustum

domonic.xml.x3d.viewpoint

alias of Viewpoint

domonic.xml.x3d.volumeData

alias of VolumeData

domonic.xml.x3d.worldInfo

alias of WorldInfo

domonic.xml.x3d.x3DAppearanceChildNode

alias of X3DAppearanceChildNode

domonic.xml.x3d.x3DAppearanceNode

alias of X3DAppearanceNode

domonic.xml.x3d.x3DBackgroundNode

alias of X3DBackgroundNode

domonic.xml.x3d.x3DBinaryContainerGeometryNode

alias of X3DBinaryContainerGeometryNode

domonic.xml.x3d.x3DBindableNode

alias of X3DBindableNode

domonic.xml.x3d.x3DBoundedObject

alias of X3DBoundedObject

domonic.xml.x3d.x3DChaserNode

alias of X3DChaserNode

domonic.xml.x3d.x3DChildNode

alias of X3DChildNode

domonic.xml.x3d.x3DColorNode

alias of X3DColorNode

domonic.xml.x3d.x3DComposableVolumeRenderStyleNode

alias of X3DComposableVolumeRenderStyleNode

domonic.xml.x3d.x3DComposedGeometryNode

alias of X3DComposedGeometryNode

domonic.xml.x3d.x3DCoordinateNode

alias of X3DCoordinateNode

domonic.xml.x3d.x3DDamperNode

alias of X3DDamperNode

domonic.xml.x3d.x3DDragSensorNode

alias of X3DDragSensorNode

domonic.xml.x3d.x3DEnvironmentNode

alias of X3DEnvironmentNode

domonic.xml.x3d.x3DEnvironmentTextureNode

alias of X3DEnvironmentTextureNode

domonic.xml.x3d.x3DFogNode

alias of X3DFogNode

domonic.xml.x3d.x3DFollowerNode

alias of X3DFollowerNode

domonic.xml.x3d.x3DFontStyleNode

alias of X3DFontStyleNode

domonic.xml.x3d.x3DGeometricPropertyNode

alias of X3DGeometricPropertyNode

domonic.xml.x3d.x3DGeometryNode

alias of X3DGeometryNode

domonic.xml.x3d.x3DGroupingNode

alias of X3DGroupingNode

domonic.xml.x3d.x3DInfoNode

alias of X3DInfoNode

domonic.xml.x3d.x3DInterpolatorNode

alias of X3DInterpolatorNode

domonic.xml.x3d.x3DLODNode

alias of X3DLODNode

domonic.xml.x3d.x3DLightNode

alias of X3DLightNode

domonic.xml.x3d.x3DMaterialNode

alias of X3DMaterialNode

domonic.xml.x3d.x3DMetadataObject

alias of X3DMetadataObject

domonic.xml.x3d.x3DNBodyCollidableNode

alias of X3DNBodyCollidableNode

domonic.xml.x3d.x3DNavigationInfoNode

alias of X3DNavigationInfoNode

domonic.xml.x3d.x3DNode

alias of X3DNode

domonic.xml.x3d.x3DPlanarGeometryNode

alias of X3DPlanarGeometryNode

domonic.xml.x3d.x3DPointingDeviceSensorNode

alias of X3DPointingDeviceSensorNode

domonic.xml.x3d.x3DRigidJointNode

alias of X3DRigidJointNode

domonic.xml.x3d.x3DSensorNode

alias of X3DSensorNode

domonic.xml.x3d.x3DShaderNode

alias of X3DShaderNode

domonic.xml.x3d.x3DShapeNode

alias of X3DShapeNode

domonic.xml.x3d.x3DSoundNode

alias of X3DSoundNode

domonic.xml.x3d.x3DSoundSourceNode

alias of X3DSoundSourceNode

domonic.xml.x3d.x3DSpatialGeometryNode

alias of X3DSpatialGeometryNode

domonic.xml.x3d.x3DTexture3DNode

alias of X3DTexture3DNode

domonic.xml.x3d.x3DTextureCoordinateNode

alias of X3DTextureCoordinateNode

domonic.xml.x3d.x3DTextureNode

alias of X3DTextureNode

domonic.xml.x3d.x3DTextureTransformNode

alias of X3DTextureTransformNode

domonic.xml.x3d.x3DTimeDependentNode

alias of X3DTimeDependentNode

domonic.xml.x3d.x3DTouchSensorNode

alias of X3DTouchSensorNode

domonic.xml.x3d.x3DTransformNode

alias of X3DTransformNode

domonic.xml.x3d.x3DVertexAttributeNode

alias of X3DVertexAttributeNode

domonic.xml.x3d.x3DViewpointNode

alias of X3DViewpointNode

domonic.xml.x3d.x3DVolumeDataNode

alias of X3DVolumeDataNode

domonic.xml.x3d.x3DVolumeRenderStyleNode

alias of X3DVolumeRenderStyleNode

class domonic.xml.x3d.x3d(*args, **kwargs)

domonic.geom

written by.ai

class domonic.geom.matrix(m)[source]

[matrixs]

rotate(pt)[source]

Rotates the point on the vector defined by the vectors m[0] and m[1].

scale(pt)[source]

Scales the point on the vector defined by the vectors m[0] and m[1].

translate(pt)[source]

Translates the point on the vector defined by the vectors m[0] and m[1].

domonic.sitemap

generate or load sitemaps

warning - when using image and video tags from this package they will be namespaced i.e <image:image> and <video:video> so i’d advise to only import them within the def that you use them in to avoid conflict with html.image

alias of atom:link

class domonic.xml.sitemap.changefreq(*args, **kwargs)
domonic.xml.sitemap.create_ns_element(tag_name, **attributes)[source]

Factory function to create elements dynamically.

domonic.xml.sitemap.geo_country

alias of geo:country

domonic.xml.sitemap.geo_geo

alias of geo:geo

domonic.xml.sitemap.geo_place_name

alias of geo:place_name

domonic.xml.sitemap.get_sitemap(path: str, *args, **kwargs)[source]

Download a sitemap

domonic.xml.sitemap.image_caption

alias of image:caption

domonic.xml.sitemap.image_geo_location

alias of image:geo_location

domonic.xml.sitemap.image_image

alias of image:image

domonic.xml.sitemap.image_license

alias of image:license

domonic.xml.sitemap.image_loc

alias of image:loc

domonic.xml.sitemap.image_title

alias of image:title

class domonic.xml.sitemap.lastmod(*args, **kwargs)
class domonic.xml.sitemap.loc(*args, **kwargs)
domonic.xml.sitemap.mobile_mobile

alias of mobile:mobile

domonic.xml.sitemap.news_keywords

alias of news:keywords

domonic.xml.sitemap.news_news

alias of news:news

domonic.xml.sitemap.news_publication_date

alias of news:publication_date

domonic.xml.sitemap.news_stock_tickers

alias of news:stock_tickers

domonic.xml.sitemap.news_title

alias of news:title

class domonic.xml.sitemap.priority(*args, **kwargs)
class domonic.xml.sitemap.sitemap(*args, **kwargs)
domonic.xml.sitemap.sitemap_format(self, *args, **kwargs)[source]

attempts to prettify the output of the sitemap.

domonic.xml.sitemap.sitemap_from_urls(urls)[source]

Create a sitemap from a list of urls.add()

Note: This won’t allow you to add priority or changefreq of the urls. or add images etc tho u could loop the nodes afterwards and do that.

WARNING: there’s a difference between a sitemap index and a sitemap. make sure you know what you want.

class domonic.xml.sitemap.sitemapindex(*args, **kwargs)
domonic.xml.sitemap.sitemapindex_from_urls(urls)[source]

Create a sitemap index from a list of urls.

WARNING: there’s a difference between a sitemap index and a sitemap. make sure you know what you want.

# i.e

# <?xml version=”1.0” encoding=”UTF-8”?> # <sitemapindex xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9”> # <sitemap> # <loc>https://xyz.com/sitemap1.xml</loc> # <lastmod>2021-07-08T13:12:16+00:00</lastmod> # </sitemap> # </sitemapindex>

class domonic.xml.sitemap.url(*args, **kwargs)
class domonic.xml.sitemap.urlset(*args, **kwargs)
domonic.xml.sitemap.video_category

alias of video:category

domonic.xml.sitemap.video_content_loc

alias of video:content_loc

domonic.xml.sitemap.video_description

alias of video:description

domonic.xml.sitemap.video_duration

alias of video:duration

domonic.xml.sitemap.video_price

alias of video:price

domonic.xml.sitemap.video_price_currency

alias of video:price_currency

domonic.xml.sitemap.video_publication_date

alias of video:publication_date

domonic.xml.sitemap.video_rating

alias of video:rating

domonic.xml.sitemap.video_tags

alias of video:tags

domonic.xml.sitemap.video_thumbnail_loc

alias of video:thumbnail_loc

domonic.xml.sitemap.video_title

alias of video:title

domonic.xml.sitemap.video_video

alias of video:video

domonic.xml.sitemap.video_view_count

alias of video:view_count

alias of xhtml:link

domonic.webapi.url

https://developer.mozilla.org/en-US/docs/Web/API/URL

# TODO - move the unit tests for this class from javascript to webapi # TODO - untested

class domonic.webapi.url.URL(url: str = '', *args: Any, **kwargs: Any)[source]

a-tag extends from URL

property hash: str

“ hash Sets or returns the anchor part (#) of a URL

class domonic.webapi.url.URLSearchParams(paramString: str | dict[str, Any] | Iterable[tuple[str, Any]])[source]

[utility methods to work with the query string of a URL]

append(key: str, value: str) None[source]

Appends a specified key/value pair as a new search parameter

delete(key: str) None[source]

Deletes the given search parameter, and its associated value, from the list of all search parameters.

entries() Iterable[tuple[str, list[str]]][source]

Returns an iterator allowing iteration through all key/value pairs contained in this object.

forEach(func: Callable[[str, list[str]], Any]) None[source]

Allows iteration through all values contained in this object via a callback function.

get(key: str) str | None[source]

Returns the first value associated with the given search parameter.

getAll(key: str) list[str] | None[source]

Returns all the values associated with a given search parameter.

has(key: str) bool[source]

Returns a Boolean indicating if such a given parameter exists.

keys() Iterable[str][source]

Returns an iterator allowing iteration through all keys of the key/value pairs contained in this object.

set(key: str, value: str) None[source]

Sets the value associated with a given search parameter to the given value. If there are several values, the others are deleted.

sort() None[source]

Sorts all key/value pairs, if any, by their keys.

toString() str[source]

Returns a string containing a query string suitable for use in a URL.

values() Iterable[list[str]][source]

Returns an iterator allowing iteration through all values of the key/value pairs contained in this object.

domonic.webapi.fetch

https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API