Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / content / base / src / nsScriptElement.h
bloba9e64f23d051c037df6bb5654b5206ba39f0407b
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsScriptElement_h
6 #define nsScriptElement_h
8 #include "mozilla/Attributes.h"
9 #include "nsIScriptLoaderObserver.h"
10 #include "nsIScriptElement.h"
11 #include "nsStubMutationObserver.h"
13 /**
14 * Baseclass useful for script elements (such as <xhtml:script> and
15 * <svg:script>). Currently the class assumes that only the 'src'
16 * attribute and the children of the class affect what script to execute.
19 class nsScriptElement : public nsIScriptElement,
20 public nsStubMutationObserver
22 public:
23 // nsIScriptLoaderObserver
24 NS_DECL_NSISCRIPTLOADEROBSERVER
26 // nsIMutationObserver
27 NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
28 NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
29 NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
30 NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
32 explicit nsScriptElement(mozilla::dom::FromParser aFromParser)
33 : nsIScriptElement(aFromParser)
37 virtual nsresult FireErrorEvent() MOZ_OVERRIDE;
39 protected:
40 // Internal methods
42 /**
43 * Check if this element contains any script, linked or inline
45 virtual bool HasScriptContent() = 0;
47 virtual bool MaybeProcessScript() MOZ_OVERRIDE;
50 #endif // nsScriptElement_h