Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-worke...
[gecko.git] / dom / base / nsDOMSerializer.h
blob3b48ced6fe8da1db5b99c13c192e2849b9a1d17a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsDOMSerializer_h_
8 #define nsDOMSerializer_h_
10 #include "mozilla/dom/NonRefcountedDOMObject.h"
11 #include "mozilla/ErrorResult.h"
12 #include "mozilla/dom/XMLSerializerBinding.h"
14 class nsINode;
15 class nsIOutputStream;
17 class nsDOMSerializer final : public mozilla::dom::NonRefcountedDOMObject {
18 public:
19 nsDOMSerializer();
21 // WebIDL API
22 static nsDOMSerializer* Constructor(
23 const mozilla::dom::GlobalObject& aOwner) {
24 return new nsDOMSerializer();
27 void SerializeToString(nsINode& aRoot, nsAString& aStr,
28 mozilla::ErrorResult& rv);
30 void SerializeToStream(nsINode& aRoot, nsIOutputStream* aStream,
31 const nsAString& aCharset, mozilla::ErrorResult& aRv);
33 bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto,
34 JS::MutableHandle<JSObject*> aReflector) {
35 return mozilla::dom::XMLSerializer_Binding::Wrap(aCx, this, aGivenProto,
36 aReflector);
40 #endif