रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
ब्लॉकली > utils > डॉम > 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 | नंबर; } पर स्विच करने के मकसद से, हमसे संपर्क करने के लिए धन्यवाद. |
एट्रिब्यूट के नाम और वैल्यू का शब्दकोश. |
opt_parent |
एलिमेंट | शून्य |
(ज़रूरी नहीं) वैकल्पिक पैरंट, जिस पर एलिमेंट जोड़ना है. |
लौटाए जाने वाले प्रॉडक्ट:
T
अगर नाम कोई स्ट्रिंग या ज़्यादा खास टाइप है, अगर वह Svg का सदस्य है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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."]]],["The `createSvgElement` function creates SVG elements. It accepts the element's tag name (`name`) as either a string or a member of the `Svg` type, along with a dictionary of attributes (`attrs`) as key-value pairs (string or number). An optional parent element (`opt_parent`) can be provided to which the created element will be appended. The function returns the created SVG element, with a specific type if given a `Svg` member.\n"]]