2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-04-26 00:42:00 -07:00
|
|
|
|
|
|
|
/*
|
2013-01-15 00:35:59 -08:00
|
|
|
* Implementation of DOMSettableTokenList specified by HTML5.
|
2010-04-26 00:42:00 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsDOMSettableTokenList_h___
|
|
|
|
#define nsDOMSettableTokenList_h___
|
|
|
|
|
|
|
|
#include "nsDOMTokenList.h"
|
|
|
|
|
|
|
|
class nsIAtom;
|
|
|
|
|
2013-01-15 00:35:59 -08:00
|
|
|
// nsISupports must be on the primary inheritance chain
|
2012-11-14 14:10:08 -08:00
|
|
|
// because nsDOMSettableTokenList is traversed by Element.
|
2015-03-21 09:28:04 -07:00
|
|
|
class nsDOMSettableTokenList final : public nsDOMTokenList
|
2010-04-26 00:42:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2013-01-15 00:35:59 -08:00
|
|
|
nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
|
|
|
|
: nsDOMTokenList(aElement, aAttrAtom) {}
|
2010-04-26 00:42:00 -07:00
|
|
|
|
2015-03-21 09:28:04 -07:00
|
|
|
virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
|
2011-08-22 02:14:13 -07:00
|
|
|
|
2013-01-15 00:35:59 -08:00
|
|
|
// WebIDL
|
|
|
|
void GetValue(nsAString& aResult) { Stringify(aResult); }
|
|
|
|
void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
|
2010-04-26 00:42:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDOMSettableTokenList_h___
|
|
|
|
|