Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
blockly > blockRendering > ConstantProvider > createDom
Phương thức blockRendering.ConstantProvider.createDom()
Tạo mọi phần tử DOM mà trình kết xuất này cần (bộ lọc, mẫu, v.v.).
Chữ ký:
createDom(svg: SVGElement, tagName: string, selector: string, injectionDivIfIsParent?: HTMLElement): void;
Thông số
Thông số |
Loại |
Mô tả |
svg |
SVGElement |
Phần gốc của SVG của không gian làm việc. |
tagName |
chuỗi |
Tên để sử dụng cho thẻ kiểu CSS. |
bộ chọn |
chuỗi |
Bộ chọn CSS cần sử dụng. |
injectionDivIfIsParent |
HTMLElement |
(Không bắt buộc) div chứa không gian làm việc mẹ và tất cả các không gian làm việc và vùng chứa khối liên quan, nếu trình kết xuất này dành cho không gian làm việc mẹ. Các biến CSS đại diện cho mẫu SVG sẽ nằm trong phạm vi của vùng chứa này. Không gian làm việc con không được ghi đè các biến CSS do không gian làm việc mẹ tạo ra, do đó không cần quyền truy cập vào div chèn. |
Trả về:
void
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-05-16 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-05-16 UTC."],[[["The `blockRendering.ConstantProvider.createDom()` method generates necessary DOM elements within the workspace's SVG for the renderer, such as filters and patterns."],["It accepts the workspace's SVG root, a style tag name, and a CSS selector as parameters to facilitate DOM element creation."],["This method modifies the SVG structure but does not return any specific value."]]],["The `createDom()` method, part of `blockRendering.ConstantProvider`, generates necessary DOM elements for the renderer, such as filters and patterns. It accepts three parameters: `svg` (the workspace's SVG root), `tagName` (CSS style tag name), and `selector` (CSS selector). This method does not return anything, and its primary function is to set up DOM elements within the workspace's SVG structure.\n"]]