/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#include "domstubs.idl"

/**
 * The DOMTokenList interface represents an interface to an underlying string
 * that consists of a set of space-separated tokens.
 *
 * For more information on this interface please see
 * <http://www.whatwg.org/html5/#domtokenlist>
 */
[scriptable, uuid(c6f1e160-eeeb-404a-98b0-6f1246520b6e)]
interface nsIDOMDOMTokenList : nsISupports
{
  readonly attribute unsigned long length;

  [getter,binaryname(MozItem)] DOMString item(in unsigned long index);
  boolean            contains([Null(Stringify)] in DOMString token);
  void               add([Null(Stringify)] in DOMString token);
  void               remove([Null(Stringify)] in DOMString token);
  boolean            toggle([Null(Stringify)] in DOMString token);

  [stringifier] DOMString          toString();
};
