| Index: Source/core/html/HTMLOptionsCollection.cpp
|
| diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp
|
| index 6619895cf63bb565f219af45daeadcd678fe697a..94706629c4c02cb54a3ca9dc345520305bd8902f 100644
|
| --- a/Source/core/html/HTMLOptionsCollection.cpp
|
| +++ b/Source/core/html/HTMLOptionsCollection.cpp
|
| @@ -114,18 +114,11 @@ void HTMLOptionsCollection::anonymousNamedGetter(const AtomicString& name, bool&
|
| returnValue0 = NamedNodesCollection::create(namedItems);
|
| }
|
|
|
| -bool HTMLOptionsCollection::anonymousIndexedSetterRemove(unsigned index, ExceptionState& exceptionState)
|
| -{
|
| - HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
|
| - base->remove(index);
|
| - return true;
|
| -}
|
| -
|
| bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionState& exceptionState)
|
| {
|
| HTMLSelectElement* base = toHTMLSelectElement(ownerNode());
|
| - if (!value) {
|
| - exceptionState.throwTypeError(ExceptionMessages::failedToSet(String::number(index), "HTMLOptionsCollection", "The element provided was not an HTMLOptionElement."));
|
| + if (!value) { // undefined or null
|
| + base->remove(index);
|
| return true;
|
| }
|
| base->setOption(index, value.get(), exceptionState);
|
|
|