From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/de/web/api/css/escape/index.html | 79 +++++++++++++++++++++++++++++ files/de/web/api/css/index.html | 90 ++++++++++++++++++++++++++++++++++ 2 files changed, 169 insertions(+) create mode 100644 files/de/web/api/css/escape/index.html create mode 100644 files/de/web/api/css/index.html (limited to 'files/de/web/api/css') diff --git a/files/de/web/api/css/escape/index.html b/files/de/web/api/css/escape/index.html new file mode 100644 index 0000000000..904da32560 --- /dev/null +++ b/files/de/web/api/css/escape/index.html @@ -0,0 +1,79 @@ +--- +title: CSS.escape() +slug: Web/API/CSS/escape +tags: + - API + - CSS + - CSSOM + - Méthode + - Referenz + - Statisch + - escape() + - maskieren +translation_of: Web/API/CSS/escape +--- +

{{APIRef("CSSOM")}}{{SeeCompatTable}}

+ +

Die statische Methode CSS.escape() gibt ein {{DOMxRef("CSSOMString")}} zurück, das die maskierte Zeichenfolge des übergebenen String Parameters enthält, hauptsächlich zur Verwendung als Teil eines CSS Selektors.

+ +

Syntax

+ +
escapedStr = CSS.escape(str);
+
+ +

Parameter

+ +
+
str
+
Die zu maskierende Zeichenfolge {{DOMxRef("CSSOMString")}}.
+
+ +

Beispiele

+ +

Grundlegende Ergebnisse

+ +
CSS.escape(".foo#bar")        // "\.foo\#bar"
+CSS.escape("()[]{}")          // "\(\)\[\]\\{\\}"
+CSS.escape('--a')             // "--a"
+CSS.escape(0)                 // "\30 ", the Unicode code point of '0' is 30
+CSS.escape('\0')              // "\ufffd", the Unicode REPLACEMENT CHARACTER
+ +

Verwendung im Kontext

+ +

Um einen String als Teil eines Selektors zu maskieren kann die escape() Methode verwendet werden:

+ +
var element = document.querySelector('#' + CSS.escape(id) + ' > img');
+ +

Die escape() Methode kann auch verwendet werden um Strings zu maskieren. Die Maskierung wird dabei auf Zeichen angewendet, die streng genommen nicht maskiert werden müssen.

+ +
var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');
+ +

Spezifikation

+ + + + + + + + + + + + + + +
SpezifikationStatusKommentar
{{SpecName('CSSOM', '#the-css.escape()-method', 'CSS.escape()')}}{{Spec2('CSSOM')}}Initial definition
+ +

Browserkompatibilität

+ + + +

{{Compat("api.CSS.escape")}}

+ +

Siehe auch

+ + diff --git a/files/de/web/api/css/index.html b/files/de/web/api/css/index.html new file mode 100644 index 0000000000..fe659bba03 --- /dev/null +++ b/files/de/web/api/css/index.html @@ -0,0 +1,90 @@ +--- +title: CSS +slug: Web/API/CSS +tags: + - API + - CSSOM + - Interface + - NeedsTranslation + - Painting + - Reference + - TopicStub +translation_of: Web/API/CSS +--- +
{{APIRef("CSSOM")}}
+ +

The CSS interface holds useful CSS-related methods. No objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.

+ +

Properties

+ +

The CSS interface is a utility interface and no object of this type can be created: only static properties are defined on it.

+ +

Static properties

+ +
+
{{DOMxRef("CSS.paintWorklet")}} {{Experimental_Inline}}{{SecureContext_Inline}}
+
Provides access to the Worklet responsible for all the classes related to painting.
+
+ +

Methods

+ +

The CSS interface is a utility interface and no object of this type can be created: only static methods are defined on it.

+ +

Static methods

+ +

No inherited static methods.

+ +
+
{{DOMxRef("CSS.registerProperty()")}}
+
Registers {{cssxref('--*', 'custom properties')}}, allowing for property type checking, default values, and properties that do or do not inherit their value.
+
{{DOMxRef("CSS.supports()")}}
+
Returns a {{JSxRef("Boolean")}} indicating if the pair property-value, or the condition, given in parameter is supported.
+
{{DOMxRef("CSS.escape()")}}
+
Can be used to escape a string mostly for use as part of a CSS selector.
+
{{DOMxRef("CSS.factory_functions", 'CSS factory functions')}}
+
Can be used to return a new CSSUnitValue with a value of the parameter number of the units of the name of the factory function method used.
+
+
CSS.em(3) // CSSUnitValue {value: 3, unit: "em"}
+
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('CSS Painting API','#dom-css-paintworklet','paintWorklet')}}{{Spec2('CSS Painting API')}}Adds the paintWorklet static property.
{{SpecName('CSSOM', '#the-css.escape()-method', 'CSS')}}{{Spec2('CSSOM')}}Adds the escape() static method.
{{SpecName('CSS3 Conditional', '#the-css-interface', 'CSS')}}{{Spec2('CSS3 Conditional')}}Initial definition
+ +

Browser compatibility

+ + + +

{{Compat("api.CSS", 1)}}

+ +

See Also

+ + -- cgit v1.2.3-54-g00ecf