The DomStyleContainer renders styles into DOM elements. References to those
elements are stored in a styles
atom, or *injected-styles*
if that is
not provided. Similarly, if no target-dom
is provided, the document.head
element is used.
The DomStyleContainer renders styles into DOM elements. References to those elements are stored in a `styles` atom, or `*injected-styles*` if that is not provided. Similarly, if no `target-dom` is provided, the `document.head` element is used.
(create-container)
(create-container target-dom)
(create-container target-dom styles-container)
Create a DomStyleContainer. With no args, the default is created, which
renders into the document.head
element. For rendering into a custom
target, such as when using Shadow DOM, you may provide a custom
target-dom
: this may either be the element itself, or a function which
returns that element.
If you also wish to provide your own storage for the style references, you may use the 3-arity version and provide an atom.
Create a DomStyleContainer. With no args, the default is created, which renders into the `document.head` element. For rendering into a custom target, such as when using Shadow DOM, you may provide a custom `target-dom`: this may either be the element itself, or a function which returns that element. If you also wish to provide your own storage for the style references, you may use the 3-arity version and provide an atom.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close