Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: Source/core/dom/DOMStringMap.h

Issue 63223002: Handle (numeric) indexed access of DOMStringMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests for array index-like properties Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/script-tests/dataset.js ('k') | Source/core/dom/DOMStringMap.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMStringMap.h
diff --git a/Source/core/dom/DOMStringMap.h b/Source/core/dom/DOMStringMap.h
index cbcc402722d870c7c15407c8f51559d4947a2ed3..6f1cd28f229e3e19cf9ed4d00774dc5cf50207d0 100644
--- a/Source/core/dom/DOMStringMap.h
+++ b/Source/core/dom/DOMStringMap.h
@@ -73,6 +73,19 @@ public:
}
bool namedPropertyQuery(const AtomicString&, ExceptionState&);
+ String anonymousIndexedGetter(uint32_t index)
+ {
+ return item(String::number(index));
+ }
+ bool anonymousIndexedSetter(uint32_t index, const String& value, ExceptionState& es)
+ {
+ return anonymousNamedSetter(String::number(index), value, es);
+ }
+ bool anonymousIndexedDeleter(uint32_t index, ExceptionState& es)
+ {
+ return anonymousNamedDeleter(AtomicString(String::number(index)), es);
+ }
+
virtual Element* element() = 0;
protected:
« no previous file with comments | « LayoutTests/fast/dom/script-tests/dataset.js ('k') | Source/core/dom/DOMStringMap.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698