|
@@ -8,6 +8,7 @@ from typing import Any, Union
|
|
|
|
|
|
from reflex.components.component import Component
|
|
from reflex.components.component import Component
|
|
from reflex.event import EventChain
|
|
from reflex.event import EventChain
|
|
|
|
+from reflex.utils import console
|
|
from reflex.vars import BaseVar, Var
|
|
from reflex.vars import BaseVar, Var
|
|
|
|
|
|
|
|
|
|
@@ -87,4 +88,10 @@ def client_side(javascript_code) -> Var[EventChain]:
|
|
An EventChain, passable to any component, that will execute the client side javascript
|
|
An EventChain, passable to any component, that will execute the client side javascript
|
|
when triggered.
|
|
when triggered.
|
|
"""
|
|
"""
|
|
|
|
+ console.deprecate(
|
|
|
|
+ feature_name="rx.client_side",
|
|
|
|
+ reason="Replaced by rx.call_script, which can be used from backend EventHandler too",
|
|
|
|
+ deprecation_version="0.2.9",
|
|
|
|
+ removal_version="0.2.10",
|
|
|
|
+ )
|
|
return BaseVar(name=f"...args => {{{javascript_code}}}", type_=EventChain)
|
|
return BaseVar(name=f"...args => {{{javascript_code}}}", type_=EventChain)
|