mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 03:05:38 -05:00
Deprecate py-button, py-inputbox, py-box and py-title (#931)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getAttribute, addClasses, htmlDecode, ensureUniqueId } from '../utils';
|
||||
import { getAttribute, addClasses, htmlDecode, ensureUniqueId, createDeprecationWarning } from '../utils';
|
||||
import { getLogger } from '../logger';
|
||||
import type { Runtime } from '../runtime';
|
||||
|
||||
@@ -21,6 +21,11 @@ export function make_PyInputBox(runtime: Runtime) {
|
||||
}
|
||||
|
||||
async connectedCallback() {
|
||||
const deprecationMessage = (
|
||||
'<p>The element <py-input> is deprecated, ' +
|
||||
'use <input class="py-input"> instead.</p>'
|
||||
)
|
||||
createDeprecationWarning(deprecationMessage, "py-input")
|
||||
ensureUniqueId(this);
|
||||
this.code = htmlDecode(this.innerHTML);
|
||||
this.mount_name = this.id.split('-').join('_');
|
||||
|
||||
Reference in New Issue
Block a user