mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Fix deprecated message (#950)
This commit is contained in:
@@ -21,8 +21,8 @@ export class PyBox extends HTMLElement {
|
|||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
const deprecationMessage = (
|
const deprecationMessage = (
|
||||||
'<p>The element <py-box> is deprecated, you should create a ' +
|
'The element <py-box> is deprecated, you should create a ' +
|
||||||
'div with "py-box" class name instead. For example: <div class="py-box"> '
|
'div with "py-box" class name instead. For example: <div class="py-box">'
|
||||||
)
|
)
|
||||||
createDeprecationWarning(deprecationMessage, "py-box")
|
createDeprecationWarning(deprecationMessage, "py-box")
|
||||||
const mainDiv = document.createElement('div');
|
const mainDiv = document.createElement('div');
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ export function make_PyButton(runtime: Runtime) {
|
|||||||
|
|
||||||
async connectedCallback() {
|
async connectedCallback() {
|
||||||
const deprecationMessage = (
|
const deprecationMessage = (
|
||||||
'<p>The element <py-button> is deprecated, create a function with your ' +
|
'The element <py-button> is deprecated, create a function with your ' +
|
||||||
'inline code and use <button py-click="function()" class="py-button"> instead.</p>'
|
'inline code and use <button py-click="function()" class="py-button"> instead.'
|
||||||
)
|
)
|
||||||
createDeprecationWarning(deprecationMessage, "py-button")
|
createDeprecationWarning(deprecationMessage, "py-button")
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export function make_PyInputBox(runtime: Runtime) {
|
|||||||
|
|
||||||
async connectedCallback() {
|
async connectedCallback() {
|
||||||
const deprecationMessage = (
|
const deprecationMessage = (
|
||||||
'<p>The element <py-input> is deprecated, ' +
|
'The element <py-input> is deprecated, ' +
|
||||||
'use <input class="py-input"> instead.</p>'
|
'use <input class="py-input"> instead.'
|
||||||
)
|
)
|
||||||
createDeprecationWarning(deprecationMessage, "py-input")
|
createDeprecationWarning(deprecationMessage, "py-input")
|
||||||
ensureUniqueId(this);
|
ensureUniqueId(this);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export class PyTitle extends HTMLElement {
|
|||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
const deprecationMessage = (
|
const deprecationMessage = (
|
||||||
'<p>The element <py-title> is deprecated, please use an <h1> tag instead.</p>'
|
'The element <py-title> is deprecated, please use an <h1> tag instead.'
|
||||||
)
|
)
|
||||||
createDeprecationWarning(deprecationMessage, "py-title")
|
createDeprecationWarning(deprecationMessage, "py-title")
|
||||||
this.label = htmlDecode(this.innerHTML);
|
this.label = htmlDecode(this.innerHTML);
|
||||||
|
|||||||
Reference in New Issue
Block a user