blockly > utils > dom > createSvgElement
Funktion utils.dom.createSvgElement()
Hilfsmethode zum Erstellen von SVG-Elementen.
Unterschrift:
export declare function createSvgElement<T extends SVGElement>(name: string | Svg<T>, attrs: {
[key: string]: string | number;
}, opt_parent?: Element | null): T;
Parameter
Parameter |
Typ |
Beschreibung |
Name |
String | Svg<T> |
Tag-Name des Elements. |
attrs |
{ [key: string]: string | Zahl; } |
Dictionary mit Attributnamen und -werten. |
opt_parent |
Element | null |
(Optional) Optionales übergeordnetes Element, an das das Element angehängt werden soll. |
Gibt zurück:
T
wenn name eine Zeichenfolge oder ein spezifischerer Typ ist, wenn er ein Mitglied von SVG ist.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-22 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-22 (UTC)."],[[["Creates SVG elements with specified attributes and optional parent element."],["Accepts element tag name, attribute dictionary, and optional parent element as parameters."],["Returns the created SVG element, with typing based on the provided tag name."],["Simplifies SVG element creation within Blockly projects."]]],[]]