mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 10:47:35 -05:00
Remove when from pydom (#1850)
* bye bye when * fix create to drop parent and actually pass the other arguments through * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update types --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,8 +6,6 @@ from typing import Any
|
||||
from pyodide.ffi import JsProxy
|
||||
from pyscript import display, document, window
|
||||
|
||||
# from pyscript import when as _when
|
||||
|
||||
alert = window.alert
|
||||
|
||||
|
||||
@@ -177,9 +175,6 @@ class Element(BaseElement):
|
||||
def show_me(self):
|
||||
self._js.scrollIntoView()
|
||||
|
||||
def when(self, event, handler):
|
||||
document.when(event, selector=self)(handler)
|
||||
|
||||
|
||||
class StyleProxy(dict):
|
||||
def __init__(self, element: Element) -> None:
|
||||
@@ -319,8 +314,8 @@ class PyDom(BaseElement):
|
||||
self.body = Element(document.body)
|
||||
self.head = Element(document.head)
|
||||
|
||||
def create(self, type_, parent=None, classes=None, html=None):
|
||||
return super().create(type_, is_child=False)
|
||||
def create(self, type_, classes=None, html=None):
|
||||
return super().create(type_, is_child=False, classes=classes, html=html)
|
||||
|
||||
def __getitem__(self, key):
|
||||
if isinstance(key, int):
|
||||
|
||||
Reference in New Issue
Block a user