แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > ผู้ใช้ > โดเมน > createSvgElement
ฟังก์ชัน utils.dom.createSvgElement()
เมธอดของตัวช่วยในการสร้างองค์ประกอบ SVG
ลายเซ็น:
export declare function createSvgElement<T extends SVGElement>(name: string | Svg<T>, attrs: {
[key: string]: string | number;
}, opt_parent?: Element | null): T;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
ชื่อ |
สตริง | Svg<T> |
ชื่อแท็กขององค์ประกอบ |
attrs |
{ [key: string]: string | number; } |
พจนานุกรมชื่อและค่าแอตทริบิวต์ |
opt_parent |
องค์ประกอบ | ค่าว่าง |
(ไม่บังคับ) ระดับบนสุดที่ไม่บังคับซึ่งจะเพิ่มองค์ประกอบต่อท้าย |
การคืนสินค้า:
T
ถ้าชื่อเป็นสตริง หรือเป็นประเภทที่เจาะจงมากขึ้นหากเป็นสมาชิกของ SVG
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-22 UTC
[null,null,["อัปเดตล่าสุด 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."]]],[]]