File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed
client/packages/idom-client-react/src Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ export function Element({ model }) {
3434 } else {
3535 return null ;
3636 }
37- } else if ( model . tagName == "script" ) {
38- return html `< ${ ScriptElement } script =${ model . children [ 0 ] } /> ` ;
3937 } else if ( model . importSource ) {
4038 return html `< ${ ImportedElement } model =${ model } /> ` ;
4139 } else {
@@ -58,12 +56,6 @@ function StandardElement({ model }) {
5856 ) ;
5957}
6058
61- function ScriptElement ( { script } ) {
62- const el = React . useRef ( ) ;
63- React . useEffect ( eval ( script ) , [ script ] ) ;
64- return null ;
65- }
66-
6759function ImportedElement ( { model } ) {
6860 const layoutContext = React . useContext ( LayoutContext ) ;
6961
Original file line number Diff line number Diff line change 150150- :func:`template`
151151"""
152152
153- from .core .vdom import VdomDict , make_vdom_constructor
153+ from .core .vdom import make_vdom_constructor
154154
155155
156156# Dcument metadata
253253del_ = make_vdom_constructor ("del" )
254254ins = make_vdom_constructor ("ins" )
255255
256- # Scripting
257-
258-
259- def script (content : str ) -> VdomDict :
260- """Create a new `<{script}> <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script>`__ element.
261-
262- Parameters:
263- content: The text of the script should evaluate to a function. This function
264- will be called when the script is initially created or when the content of the
265- script changes. The function may optionally return a teardown function that is
266- called when the script element is removed from the tree, or when the script
267- content changes.
268- """
269- return {"tagName" : "script" , "children" : [content ]}
270-
271-
272256# Table content
273257caption = make_vdom_constructor ("caption" )
274258col = make_vdom_constructor ("col" )
You can’t perform that action at this time.
0 commit comments