content/base/src/nsDOMSettableTokenList.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/src/nsDOMSettableTokenList.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/*
     1.9 + * Implementation of DOMSettableTokenList specified by HTML5.
    1.10 + */
    1.11 +
    1.12 +#ifndef nsDOMSettableTokenList_h___
    1.13 +#define nsDOMSettableTokenList_h___
    1.14 +
    1.15 +#include "nsDOMTokenList.h"
    1.16 +
    1.17 +class nsIAtom;
    1.18 +
    1.19 +// nsISupports must be on the primary inheritance chain
    1.20 +// because nsDOMSettableTokenList is traversed by Element.
    1.21 +class nsDOMSettableTokenList MOZ_FINAL : public nsDOMTokenList
    1.22 +{
    1.23 +public:
    1.24 +
    1.25 +  nsDOMSettableTokenList(mozilla::dom::Element* aElement, nsIAtom* aAttrAtom)
    1.26 +    : nsDOMTokenList(aElement, aAttrAtom) {}
    1.27 +
    1.28 +  virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
    1.29 +
    1.30 +  // WebIDL
    1.31 +  void GetValue(nsAString& aResult) { Stringify(aResult); }
    1.32 +  void SetValue(const nsAString& aValue, mozilla::ErrorResult& rv);
    1.33 +};
    1.34 +
    1.35 +#endif // nsDOMSettableTokenList_h___
    1.36 +

mercurial