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
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsDOMSettableTokenList.h"
|
2012-06-13 08:18:30 -07:00
|
|
|
#include "mozilla/dom/DOMSettableTokenListBinding.h"
|
2012-11-14 14:10:08 -08:00
|
|
|
#include "mozilla/dom/Element.h"
|
2010-04-26 00:42:00 -07:00
|
|
|
|
2013-01-15 00:35:59 -08:00
|
|
|
void
|
|
|
|
nsDOMSettableTokenList::SetValue(const nsAString& aValue, mozilla::ErrorResult& rv)
|
2010-04-26 00:42:00 -07:00
|
|
|
{
|
|
|
|
if (!mElement) {
|
2013-01-15 00:35:59 -08:00
|
|
|
return;
|
2010-04-26 00:42:00 -07:00
|
|
|
}
|
|
|
|
|
2013-01-15 00:35:59 -08:00
|
|
|
rv = mElement->SetAttr(kNameSpaceID_None, mAttrAtom, aValue, true);
|
2010-04-26 00:42:00 -07:00
|
|
|
}
|
|
|
|
|
2011-08-22 02:14:13 -07:00
|
|
|
JSObject*
|
2014-04-08 15:27:18 -07:00
|
|
|
nsDOMSettableTokenList::WrapObject(JSContext *cx)
|
2011-08-22 02:14:13 -07:00
|
|
|
{
|
Bug 991742 part 6. Remove the "aScope" argument of binding Wrap() methods. r=bholley
This patch was mostly generated with this command:
find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""
plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
2014-04-08 15:27:17 -07:00
|
|
|
return mozilla::dom::DOMSettableTokenListBinding::Wrap(cx, this);
|
2011-08-22 02:14:13 -07:00
|
|
|
}
|