michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * Implementation of DOMSettableTokenList specified by HTML5. michael@0: */ michael@0: michael@0: #include "nsDOMSettableTokenList.h" michael@0: #include "mozilla/dom/DOMSettableTokenListBinding.h" michael@0: #include "mozilla/dom/Element.h" michael@0: michael@0: void michael@0: nsDOMSettableTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult& rv) michael@0: { michael@0: if (!mElement) { michael@0: return; michael@0: } michael@0: michael@0: rv = mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true); michael@0: } michael@0: michael@0: JSObject* michael@0: nsDOMSettableTokenList::WrapObject(JSContext *cx) michael@0: { michael@0: return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, this); michael@0: }