mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 19:25:35 -05:00
add test for more elements up to caption
This commit is contained in:
@@ -2,6 +2,7 @@ import sys
|
||||
|
||||
import js as globalThis
|
||||
from polyscript import js_modules
|
||||
|
||||
from pyscript.util import NotSupported
|
||||
|
||||
RUNNING_IN_WORKER = not hasattr(globalThis, "document")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from pyodide.ffi import to_js
|
||||
|
||||
from pyscript import window
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from textwrap import dedent
|
||||
|
||||
from pyscript import document, when, window
|
||||
from pyweb import JSProperty, js_property, pydom
|
||||
|
||||
from pyscript import document, when, window
|
||||
|
||||
# Global attributes that all elements have (this list is a subset of the official one)
|
||||
# and tries to capture the most used ones
|
||||
GLOBAL_ATTRIBUTES = [
|
||||
@@ -193,7 +194,7 @@ _add_js_properties(
|
||||
)
|
||||
|
||||
|
||||
class article(ElementBase):
|
||||
class article(TextElementBase):
|
||||
tag = "article"
|
||||
|
||||
|
||||
@@ -201,7 +202,7 @@ class article(ElementBase):
|
||||
_add_js_properties(article)
|
||||
|
||||
|
||||
class aside(ElementBase):
|
||||
class aside(TextElementBase):
|
||||
tag = "aside"
|
||||
|
||||
|
||||
@@ -228,7 +229,7 @@ _add_js_properties(
|
||||
)
|
||||
|
||||
|
||||
class b(ElementBase):
|
||||
class b(TextElementBase):
|
||||
tag = "b"
|
||||
|
||||
|
||||
@@ -236,7 +237,7 @@ class b(ElementBase):
|
||||
_add_js_properties(b)
|
||||
|
||||
|
||||
class blockquote(ElementBase):
|
||||
class blockquote(TextElementBase):
|
||||
tag = "blockquote"
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
"""Markdown module to generate web/HTML components from Markdown code"""
|
||||
|
||||
from pyscript import document, window
|
||||
from pyweb import pydom
|
||||
from pyweb.ui.elements import TextElementBase, script
|
||||
|
||||
from pyscript import document, window
|
||||
|
||||
|
||||
class markdown(TextElementBase):
|
||||
"""Markdown component to render HTML from Markdown code"""
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import string
|
||||
from textwrap import dedent
|
||||
|
||||
from pyscript import document, when, window
|
||||
from pyweb import JSProperty, js_property, pydom
|
||||
from pyweb.ui import elements as el
|
||||
|
||||
from pyscript import document, when, window
|
||||
|
||||
|
||||
class ShoeBase(pydom.Element):
|
||||
tag = "div"
|
||||
|
||||
Reference in New Issue
Block a user