reflex/reflex/components/el/elements/scripts.py
Thomas Brandého fb444ad112
add ERA rules to detect commented out code (#4472)
* add eradicate rules for commented out code

* remove output change

* fix pyi messed up indent

* fix pyi again

* fix layout docstring

* fix pyi_generator to remove commented out props from docs

* fix pyi_generator and regenerate some pyi

* fix double strip

* update all pyi

* try to fix stuff in pyi_gen

* whatever

* remove that maybe? i don't know

* fix that shit?

* fix more shit, idk

* better not see you ever again, extra line
2024-12-11 18:26:44 -08:00

58 lines
1.3 KiB
Python

"""Scripts classes."""
from typing import Union
from reflex.vars.base import Var
from .base import BaseHTML
class Canvas(BaseHTML):
"""Display the canvas element."""
tag = "canvas"
class Noscript(BaseHTML):
"""Display the noscript element."""
tag = "noscript"
class Script(BaseHTML):
"""Display the script element."""
tag = "script"
# Indicates that the script should be executed asynchronously
async_: Var[Union[str, int, bool]]
# Character encoding of the external script
char_set: Var[Union[str, int, bool]]
# Configures the CORS requests for the script
cross_origin: Var[Union[str, int, bool]]
# Indicates that the script should be executed after the page has finished parsing
defer: Var[Union[str, int, bool]]
# Security feature allowing browsers to verify what they fetch
integrity: Var[Union[str, int, bool]]
# Specifies the scripting language used in the type attribute
language: Var[Union[str, int, bool]]
# Specifies which referrer information to send when fetching the script
referrer_policy: Var[Union[str, int, bool]]
# URL of an external script
src: Var[Union[str, int, bool]]
# Specifies the MIME type of the script
type: Var[Union[str, int, bool]]
canvas = Canvas.create
noscript = Noscript.create
script = Script.create