File tree 2 files changed +1
-25
lines changed
client/packages/idom-client-react/src
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 }) {
34
34
} else {
35
35
return null ;
36
36
}
37
- } else if ( model . tagName == "script" ) {
38
- return html `< ${ ScriptElement } script =${ model . children [ 0 ] } /> ` ;
39
37
} else if ( model . importSource ) {
40
38
return html `< ${ ImportedElement } model =${ model } /> ` ;
41
39
} else {
@@ -58,12 +56,6 @@ function StandardElement({ model }) {
58
56
) ;
59
57
}
60
58
61
- function ScriptElement ( { script } ) {
62
- const el = React . useRef ( ) ;
63
- React . useEffect ( eval ( script ) , [ script ] ) ;
64
- return null ;
65
- }
66
-
67
59
function ImportedElement ( { model } ) {
68
60
const layoutContext = React . useContext ( LayoutContext ) ;
69
61
Original file line number Diff line number Diff line change 150
150
- :func:`template`
151
151
"""
152
152
153
- from .core .vdom import VdomDict , make_vdom_constructor
153
+ from .core .vdom import make_vdom_constructor
154
154
155
155
156
156
# Dcument metadata
253
253
del_ = make_vdom_constructor ("del" )
254
254
ins = make_vdom_constructor ("ins" )
255
255
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
-
272
256
# Table content
273
257
caption = make_vdom_constructor ("caption" )
274
258
col = make_vdom_constructor ("col" )
You can’t perform that action at this time.
0 commit comments