🤖 autodocs¶
domonic¶
A library for creating html
domonic.html¶
Generate HTML using python.
- 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.caption(*args, **kwargs)¶
- class domonic.html.center(*args, **kwargs)¶
- class domonic.html.cite(*args, **kwargs)¶
- 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.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.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.link(*args, rel=None, href=None, type=None, sizes=None, **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.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.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:
- Returns:
The rendered HTML string (or PyML if specified).
- Return type:
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.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 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.
- class domonic.dom.DOMConfig[source]¶
Global rendering and behaviour flags for domonic’s DOM.
DOMConfigcontrols 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
DOMMatriximplementation.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.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.
- 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.
- 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
- static createCDATASection(data: str) CDATASection[source]¶
Creates a CDATASection node with the specified data
- 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 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 createTreeWalker(root: Node, whatToShow: int | None = None, filter: Any = None, entityReferenceExpansion: Any = None) TreeWalker[source]¶
[creates a TreeWalker object]
- Parameters:
- Returns:
[a new TreeWalker object]
- Return type:
[type]
- property doctype¶
Returns the Document Type Declaration associated with 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
- 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]
- getElementsByName(name: str)[source]¶
[Returns a NodeList containing all elements with a specified name]
- 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
- property links¶
Returns a collection of all <a> and <area> elements in the document that have a href attribute
- 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.]
- 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]
- getElementsByTagName(tagName: str) HTMLCollection¶
[Returns a collection of all child elements with the specified tag name
- querySelector(query: str) Element | None¶
[Returns the first child element that matches a specified CSS selector(s) of an element]
- 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.timelineandElement.animate(...).
- class domonic.dom.DocumentType(name: str = 'html', publicId: str = '', systemId: str = '')[source]¶
-
- 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
- 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
- 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 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.
- 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]
- 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).
- getElementsByTagName(tagName: str) HTMLCollection[source]¶
[Returns a collection of all child elements with the specified tag name
- hasAttribute(attribute: str) bool[source]¶
Returns True if an element has the specified attribute, otherwise False
- 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
- offsetHeight() float[source]¶
Returns the height of an element, including padding, border and scrollbar
- offsetWidth() float[source]¶
Returns the width of an element, including padding, border and scrollbar
- 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]
- querySelectorAll(query: str) list[Element][source]¶
[Returns all child elements that matches a specified CSS selector(s) of an element]
- removeAttributeNode(attribute)[source]¶
Removes a specified attribute node, and returns the removed node
- 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
- setAttribute(attribute, value)[source]¶
Sets or changes the specified attribute, to the specified value
- setAttributeNode(attr)[source]¶
[Sets or changes the specified attribute node]
- Parameters:
attr ([type]) – [an Attr object]
- property style¶
returns the value of the style attribute of an element
- property title¶
returns the value of the title attribute of an element
- class domonic.dom.Entity(*args)[source]¶
- 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.
- 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.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]¶
- class domonic.dom.HTMLCanvasElement(*args, width: int = None, height: int = None, **kwargs)[source]¶
- class domonic.dom.HTMLCollection(iterable=(), /)[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.]
- 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.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]¶
- class domonic.dom.HTMLLinkElement(*args, rel=None, href=None, type=None, sizes=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.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.]
- namedItem(name: str) HTMLOptionElement | None[source]¶
Returns the specific node whose ID or, as a fallback, name matches the string specified by name.
- 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.HTMLSourceElement(*args, src=None, type=None, media=None, sizes=None, **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.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.HTMLTrackElement(*args, kind=None, label=None, src=None, srclang=None, default=None, **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
MutationRecordbatches.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 ortakeRecords().
- 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.NamedNodeMapbehaves 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 children: list[Node]¶
Returns a collection of an element’s child element (excluding text and comment nodes)
- 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
- 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.
- 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.
- lookupNamespaceURI(ns: str)[source]¶
Returns the namespace URI for a given prefix
- Parameters:
ns – prefix - i.e ‘xml’, ‘xlink’, ‘svg’, etc
- property nextSibling¶
[returns the next sibling of the current node.]
- 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.]
- 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.]
- 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.
- 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.
- class domonic.dom.ParentNode(*args, **kwargs)[source]¶
not tested yet
- property firstElementChild¶
First Element child node.
- property lastElementChild¶
Last Element child node.
- 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
ResizeObserverentries.
- class domonic.dom.Selection[source]¶
Represents the user’s current selection within a document or shadow tree.
Domonic keeps both ordered
Rangedata 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.
- class domonic.dom.StaticRange(startContainer, startOffset, endContainer, endOffset)[source]¶
Immutable snapshot of a range boundary pair.
StaticRangemirrors the platform idea of a range-like object that can be inspected and cloned back into a mutableRangebut 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.
- 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.]
- 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]
- 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]
- 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]
- 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
- map(func: Callable[[Any], Any]) list[Any][source]¶
[Creates a new array with the result of calling a function for each array element]
- 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.
- 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
- 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]
- some(func: Callable[[Any], bool]) bool[source]¶
Checks if any of the elements in an array pass a test
- 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
- 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:
- 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
- getUTCMilliseconds() int[source]¶
Returns the milliseconds, according to universal time (from 0-999)
- static parse(date_string: Any) int[source]¶
Parses a date string and returns the number of milliseconds since January 1, 1970
- setFullYear(yearValue: int, monthValue: int | None = None, dateValue: int | None = None) int[source]¶
Sets the year of a date object
- 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:
- Returns:
milliseconds between epoch and updated date.
- Return type:
- 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
- setSeconds(secondsValue: int, msValue: int | None = None) int[source]¶
Sets the seconds of a date object
- 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
- 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
- setUTCSeconds(seconds: int) int[source]¶
Set the seconds of a date object, according to universal time
- toLocaleDateString() str[source]¶
Returns the date portion of a Date object as a string, using locale conventions
- 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]
- 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.]
- class domonic.javascript.Global[source]¶
javascript global methods
- static clearTimeout(timeoutID: int) None[source]¶
[cancels a timer set with setTimeout()]
- Parameters:
timeoutID ([str]) – [the identifier returned by setTimeout()]
- static eval(pythonstring: str) Any[source]¶
Evaluates a string and executes it as if it was script code
- 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.
- 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.
- 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
- 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
- toPrecision(precision: int) str[source]¶
[returns a string representing the Number object to the specified precision.]
- 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.
- 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]
- blink() str[source]¶
[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]
- codePointAt(index: int) int[source]¶
[Returns the Unicode code point at the specified index (position)]
- 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.]
- 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]
- fromCharCode(*codes: int) str[source]¶
returns a string created from the specified sequence of UTF-16 code units
- includes(searchValue: str, position: int = 0) bool[source]¶
[returns true if the specified string is found within the calling String object,]
- 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 ]
- 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
- 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.]
- padStart(length: int, padChar: str = ' ') str[source]¶
[Pads the start of a string with a specified character]
- 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]
- 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]
- 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]
- toLocaleLowerCase() str[source]¶
Converts a string to lowercase letters, according to the host’s locale
- class domonic.javascript.Window(*args: Any, **kwargs: Any)[source]¶
window
- 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]
- 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]
- 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.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.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]
- 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.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.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.link(*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.unlink(*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.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]
- domonic.JSON.parse_file(filepath: str | Path) Any[source]¶
[loads a json file and returns a python object]
- domonic.JSON.stringify(data: Any, filepath: str | Path | None = None, **kwargs) str[source]¶
[stringify a python object]
- domonic.JSON.table2json(node) list[dict[str, str]][source]¶
Convert a domonic table node back into a list of row dictionaries.
domonic.CDN¶
For quick reference when prototyping
- 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’))
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.AnimationEvent[source]¶
-
- 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]¶
- class domonic.events.ClipboardEvent[source]¶
-
- clipboardData¶
Returns an object containing the data affected by the clipboard operation
- class domonic.events.Event(_type: str = '', options: dict[str, Any] | None = None, *args, **kwargs)[source]¶
Event class represents events and their properties.
- initEvent(_type: str | None = None, bubbles: bool = True, cancelable: bool = True, *args, **kwargs) Event[source]¶
Initialize the event.
- 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
- 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, andsignalfields accepted byaddEventListener().
- class domonic.events.EventTarget(*args, **kwargs)[source]¶
DOM-style event target base class.
Extend
EventTargetto give an object support foraddEventListener(),removeEventListener(), anddispatchEvent()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:
- 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:
Usage:
To dispatch an event asynchronously, use the
awaitkeyword when calling this method.Example:
event_data = {"message": "Hello, world!"} async_event = {"type": "async_event", "data": event_data} await target.dispatchEventAsync(async_event)
- class domonic.events.ExtendableEvent[source]¶
- extendable¶
Returns whether the event is extendable or not
- class domonic.events.FetchEvent[source]¶
-
- clientId¶
Returns the client ID of the fetch request
- request¶
Returns the request object
- class domonic.events.InputEvent[source]¶
-
- 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
- class domonic.events.MessageEvent[source]¶
-
- 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
- class domonic.events.PageTransitionEvent[source]¶
-
- persisted¶
Returns whether the webpage was cached by the browser
- class domonic.events.PopStateEvent[source]¶
-
- state¶
Returns an object containing a copy of the history entries
- class domonic.events.PromiseRejectionEvent[source]¶
-
- 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.SecurityPolicyViolationEvent[source]¶
-
- 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]¶
-
- 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.SyncEvent[source]¶
-
- lastChance¶
Returns whether the sync event is the last chance or not
- tag¶
Returns the tag of the sync event
- class domonic.events.TransitionEvent[source]¶
-
- 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.UIEvent(_type: str, options: dict = None, *args, **kwargs)[source]¶
UIEvent is a specialized event class for user interface events.
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.
- 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.
- 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.
- 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.
- 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.
- 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
Sets or returns where to navigate when using the arrow-down navigation key
Sets or returns the tabbing order for an element
Sets or returns where to navigate when using the arrow-left navigation key
Sets or returns where to navigate when using the arrow-right navigation key
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.
domonic.window¶
The DOM-connected Window implementation for domonic.
Be mindful that domonic has two window-shaped surfaces:
domonic.javascript.Windowfor JavaScript-style globals and timer helpersdomonic.window.Windowfor a browsing-context style object connected todocument, history, storage, media queries, and custom elements
- class domonic.window.CustomElementRegistry[source]¶
Registry for defining and upgrading custom elements.
Access this through
window.customElementsto register custom element classes, wait for definitions, and upgrade parsed trees against the registry.
- 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
changelisteners in the familiar browser style.
Minimal browsing-environment navigator object.
Returns the platform
Returns the product name
Returns the user-agent header sent by the browser Navigator
- 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 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 ]
- static dictify(arr: Iterable[T]) dict[T, int][source]¶
[turns a list into a dictionary where the list items are the keys]
- static digits(text: str = '') str[source]¶
[takes a string of mix of digits and letters and returns a string of digits]
- static frequency(data: Iterable[T]) dict[T, int][source]¶
[check the frequency of elements in the data]
- 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]
- static permutations(word: str) list[source]¶
[provides all the possible permutations of a given word]
- 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:
- Returns:
[the new string]
- Return type:
[str]
- static to_dictionary(keys: Iterable[T], values: Iterable[Any]) dict[T, Any][source]¶
[take a list of keys and values and returns a dict]
- static truncate(text: str = '', length: int = 0) str[source]¶
[truncates a string and appends 3 dots]
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.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
@silenceand@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.
- 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.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
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)¶
- 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)¶
- 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)¶
- 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.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)¶
- 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)¶
- class domonic.xml.x3d.SegmentedVolumeData(*args, **kwargs)¶
- class domonic.xml.x3d.ShadedVolumeStyle(*args, **kwargs)¶
- class domonic.xml.x3d.ShaderPart(*args, **kwargs)¶
- 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)¶
- 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)¶
- 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)¶
- 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.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)¶
- class domonic.xml.x3d.appearance(*args, **kwargs)¶
- domonic.xml.x3d.arcClose2D¶
alias of
ArcClose2D
- domonic.xml.x3d.background¶
alias of
Background
- domonic.xml.x3d.binaryGeometry¶
alias of
BinaryGeometry
- domonic.xml.x3d.blendedVolumeStyle¶
alias of
BlendedVolumeStyle
- 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.cartoonVolumeStyle¶
alias of
CartoonVolumeStyle
- domonic.xml.x3d.collidableShape¶
alias of
CollidableShape
- domonic.xml.x3d.collisionCollection¶
alias of
CollisionCollection
- domonic.xml.x3d.collisionSensor¶
alias of
CollisionSensor
- 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.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.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.cylinderSensor¶
alias of
CylinderSensor
- domonic.xml.x3d.directionalLight¶
alias of
DirectionalLight
- 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.floatVertexAttribute¶
alias of
FloatVertexAttribute
- domonic.xml.x3d.generatedCubeMapTexture¶
alias of
GeneratedCubeMapTexture
- domonic.xml.x3d.geoCoordinate¶
alias of
GeoCoordinate
- domonic.xml.x3d.geoElevationGrid¶
alias of
GeoElevationGrid
- domonic.xml.x3d.geoLocation¶
alias of
GeoLocation
- domonic.xml.x3d.geoMetadata¶
alias of
GeoMetadata
- domonic.xml.x3d.geoPositionInterpolator¶
alias of
GeoPositionInterpolator
- domonic.xml.x3d.geoTransform¶
alias of
GeoTransform
- domonic.xml.x3d.geoViewpoint¶
alias of
GeoViewpoint
- 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.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.lineProperties¶
alias of
LineProperties
- 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.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
alias of
NavigationInfo
- domonic.xml.x3d.normalInterpolator¶
alias of
NormalInterpolator
- 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.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.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.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.rigidBodyCollection¶
alias of
RigidBodyCollection
- 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.solidOfRevolution¶
alias of
SolidOfRevolution
- 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.staticGroup¶
alias of
StaticGroup
- domonic.xml.x3d.stippleVolumeStyle¶
alias of
StippleVolumeStyle
- domonic.xml.x3d.surfaceShaderTexture¶
alias of
SurfaceShaderTexture
- domonic.xml.x3d.texCoordDamper2D¶
alias of
TexCoordDamper2D
- 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.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.universalJoint¶
alias of
UniversalJoint
- domonic.xml.x3d.viewfrustum¶
alias of
Viewfrustum
- domonic.xml.x3d.volumeData¶
alias of
VolumeData
- 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
alias of
X3DNavigationInfoNode
- 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
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
- domonic.xml.sitemap.atom_link¶
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.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
- domonic.xml.sitemap.xhtml_link¶
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
- 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.
- keys() Iterable[str][source]¶
Returns an iterator allowing iteration through all keys of the key/value pairs contained in this object.