Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  ScriptElement.h

  Sprache: C
 

/* 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/. */


#ifndef mozilla_dom_ScriptElement_h
#define mozilla_dom_ScriptElement_h

#include "mozilla/Attributes.h"
#include "nsIScriptElement.h"
#include "nsIScriptLoaderObserver.h"
#include "nsStubMutationObserver.h"

class nsIParser;

namespace mozilla::dom {

/**
 * Baseclass useful for script elements (such as <xhtml:script> and
 * <svg:script>). Currently the class assumes that only the 'src'
 * attribute and the children of the class affect what script to execute.
 */


class ScriptElement : public nsIScriptElement, public nsStubMutationObserver {
 public:
  // nsIScriptLoaderObserver
  NS_DECL_NSISCRIPTLOADEROBSERVER

  // nsIMutationObserver
  NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
  NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
  NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
  NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
  NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED

  explicit ScriptElement(FromParser aFromParser)
      : nsIScriptElement(aFromParser) {}

  virtual nsresult FireErrorEvent() override;

  virtual bool GetScriptType(nsAString& aType) override;

 protected:
  // Internal methods

  /**
   * Check if this element contains any linked script.
   */

  virtual bool HasExternalScriptContent() = 0;

  virtual bool MaybeProcessScript(nsCOMPtr<nsIParser> aParser) override;

  virtual MOZ_CAN_RUN_SCRIPT nsresult
  GetTrustedTypesCompliantInlineScriptText(nsString& aSourceText) override;

 private:
  // https://github.com/w3c/trusted-types/pull/579
  void UpdateTrustWorthiness(MutationEffectOnScript aMutationEffectOnScript);

  bool MaybeProcessScript(const nsAString& aSourceText);
};

}  // namespace mozilla::dom

#endif  // mozilla_dom_ScriptElement_h

Messung V0.5 in Prozent
C=87 H=95 G=90

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002