diff options
Diffstat (limited to 'Source/WebCore/dom/DatasetDOMStringMap.h')
-rw-r--r-- | Source/WebCore/dom/DatasetDOMStringMap.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/WebCore/dom/DatasetDOMStringMap.h b/Source/WebCore/dom/DatasetDOMStringMap.h index 3a4bfa843..a3914fd96 100644 --- a/Source/WebCore/dom/DatasetDOMStringMap.h +++ b/Source/WebCore/dom/DatasetDOMStringMap.h @@ -23,21 +23,17 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DatasetDOMStringMap_h -#define DatasetDOMStringMap_h +#pragma once +#include "ExceptionOr.h" #include "ScriptWrappable.h" -#include <wtf/Noncopyable.h> -#include <wtf/Vector.h> -#include <wtf/text/WTFString.h> namespace WebCore { class Element; -typedef int ExceptionCode; class DatasetDOMStringMap final : public ScriptWrappable { - WTF_MAKE_NONCOPYABLE(DatasetDOMStringMap); WTF_MAKE_FAST_ALLOCATED; + WTF_MAKE_FAST_ALLOCATED; public: explicit DatasetDOMStringMap(Element& element) : m_element(element) @@ -47,18 +43,18 @@ public: void ref(); void deref(); - void getNames(Vector<String>&); - String item(const String& name); - bool contains(const String& name); - void setItem(const String& name, const String& value, ExceptionCode&); - void deleteItem(const String& name, ExceptionCode&); + Vector<String> supportedPropertyNames() const; - Element* element() { return &m_element; } + String namedItem(const AtomicString& name) const; + ExceptionOr<void> setItem(const String& name, const String& value); + bool deleteItem(const String& name); + + Element& element() { return m_element; } private: + std::optional<const AtomicString&> item(const String& name) const; + Element& m_element; }; } // namespace WebCore - -#endif // DatasetDOMStringMap_h |