Index: sky/engine/core/dom/Element.cpp |
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp |
index 78d958c9d31c2020761e7fe64a2f3fc8ef43ded8..dca6f3c2fa31b2c07bcd04ff0dc4b296b54c5bee 100644 |
--- a/sky/engine/core/dom/Element.cpp |
+++ b/sky/engine/core/dom/Element.cpp |
@@ -992,6 +992,15 @@ Vector<RefPtr<Attr>> Element::getAttributes() |
return attributes; |
} |
+void Element::setAttributes(const Vector<RefPtr<Attr>>& attrs, ExceptionState& es) |
+{ |
+ for (const auto& attr : attrs) { |
+ setAttribute(attr->name(), attr->value(), es); |
+ if (es.had_exception()) |
+ return; |
+ } |
+} |
+ |
void Element::focus(bool restorePreviousSelection, FocusType type) |
{ |
if (!inDocument()) |