Codeschnipsel

  • Adressname der Version: Codeschnipsel
  • Titel der Version: Codeschnipsel
  • ID der Version: 112525
  • Erstellt:
  • Autor: Lukas Skywalker
  • Aktuelle Version? Nein
  • Kommentar page content-type changed to 'application/x.deki0805+xml'

Inhalt der Version

ACHTUNG!!! Diese Seite ist im Aufbau. Bitte die englische Version benützen oder mithelfen!  Code snippets

 

 

 

Code Schnipsel

 

     

Dies ist eine kurze Liste mit nützlichen Code-Schnipsel (kleine Code-Beispiele) für Erweiterungs-Entwickler der verschiedeneen Mozilla-Programme. Viele dieser Beispiele können sowohl in XULRunner-Programmen als auch im aktuellen Mozilla-Code benützt werden.

Diese Beispiele zeigen, wie grundlegende Aufgaben bewältigt werden können, deren Lösung nicht offensichtlich ist.

 

Generell

Fenster-Code
Fenster öffnen und bearbeiten
Toolbar
Toolbar related code
Sidebar
Sidebar related code
XML
Der Code, der benütz wird um XML zu parsen, schreiben, verändern, etc.
File I/O
Der Code, der benütz wird um Dateien zu lesen und zu schreiben
Drag & Drop
Der Code, der benütz wird um "drag and drop"-Events zu managen
Dialogs
Code used to display and process dialog boxes
Preferences
Code used to read, write, and modify preferences
JS XPCOM
Code used to define and call XPCOM components in JavaScript
Running applications
Code used to run other applications
<canvas> related
WHAT WG Canvas-related code
Signing a XPI
How to sign a XPI with PKI
Threads
Performing background operations and delaying execution while background operations complete
Miscellaneous
Miscellaneous useful code fragments
HTML to DOM
Using a hidden browser element to parse HTML to a window's DOM

Browser-oriented code

Tabbed browser code (Firefox/SeaMonkey)
Basic operations, such as page loading, with the tabbed browser, which is the heart of Mozilla's browser applications
Cookies
Reading, writing, modifying, and removing cookies
Page Loading
Code used to load pages, reload pages, and listen for page loads
Interaction between privileged and non-privileged code
How to communicate between extensions and websites and vice-versa.
Downloading Files
Code to download files, images, and to monitor download progress
Password Manager
Code used to read and write passwords to/from the integrated password manager
Bookmarks
Code used to read and write bookmarks

SVG

General
General information and utilities
SVG Animation
Animate SVG using JavaScript and SMIL
SVG Interacting with Script
Using JavaScript and DOM events to create interactive SVG
Embedding SVG in HTML and XUL
Using SVG to enhance HTML or XUL based markup

XUL Widgets

Label and description
Special uses and line breaking examples
Tree
Setup and manipulation of trees using XUL and JS
Scrollbar
Changing style of scrollbars. Applies to scrollbars in browser and iframe as well.
Autocomplete
Code used to enable form autocomplete in a browser
Boxes
Tips and tricks when using boxes as containers

Windows-specific

Finding Window Handles (HWND) (Firefox)
How to use Windows API calls to find various kinds of Mozilla window handles. Window handles can be used for IPC and Accessibility purposes.
Using the Windows Registry with XPCOM
How to read, write, modify, delete, enumerate, and watch registry keys and values.

External links

The content at MozillaZine Example Code is slowly being moved here, but you can still find useful examples there for now.

{{ languages( { "fr": "fr/Extraits_de_code", "ja": "ja/Code_snippets", "ko": "ko/Code_snippets", "pl": "pl/Fragmenty_kodu" } ) }}

Quelltext der Version

<pre><span style="background-color: rgb(255, 255, 255);">ACHTUNG!!! Diese Seite ist im Aufbau. Bitte die englische Version benützen oder mithelfen!</span><span style="background-color: rgb(255, 0, 0);">  <a class="internal" href="mks://localhost/En/Code_snippets" title="En/Code snippets">Code snippets</a><br></span></pre>
<p> </p>

<p> </p>
<p> </p>
<h1>Code Schnipsel</h1>
<p> </p>
<p>     </p>
<p>Dies ist eine kurze Liste mit nützlichen Code-Schnipsel (kleine Code-Beispiele) für Erweiterungs-Entwickler der verschiedeneen Mozilla-Programme. Viele dieser Beispiele können sowohl in XULRunner-Programmen als auch im aktuellen Mozilla-Code benützt werden.</p>
<p>Diese Beispiele zeigen, wie grundlegende Aufgaben bewältigt werden können, deren Lösung nicht offensichtlich ist.</p>
<p> </p>
<h3 name="General">Generell</h3>
<dl><dt> <a class="internal" href="/de/Code%20snippets/Windows" title="de/Code snippets/Windows">Fenster-Code</a> </dt><dd> <small>Fenster öffnen und bearbeiten<br>
</small></dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Toolbar" title="de/Code snippets/Toolbar">Toolbar</a> </dt><dd> <small>Toolbar related code</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Sidebar" title="de/Code snippets/Sidebar">Sidebar</a> </dt><dd> <small>Sidebar related code</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/XML" title="de/Code snippets/XML">XML</a> </dt><dd> <small>Der Code, der benütz wird um XML zu parsen, schreiben, verändern, etc.</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/File%20I//O" title="de/Code snippets/File I//O">File I/O</a> </dt><dd> <small>Der Code, der benütz wird um Dateien zu lesen und zu schreiben</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Drag%20&amp;%20Drop" title="de/Code snippets/Drag &amp; Drop">Drag &amp; Drop</a> </dt><dd> <small>Der Code, der benütz wird um "drag and drop"-Events zu managen</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Dialogs%20and%20Prompts" title="de/Code snippets/Dialogs and Prompts">Dialogs</a> </dt><dd> <small>Code used to display and process dialog boxes</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Preferences" title="de/Code snippets/Preferences">Preferences</a> </dt><dd> <small>Code used to read, write, and modify preferences</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/JS%20XPCOM" title="de/Code snippets/JS XPCOM">JS XPCOM</a> </dt><dd> <small>Code used to define and call XPCOM components in JavaScript</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Running%20applications" title="de/Code snippets/Running applications">Running applications</a> </dt><dd> <small>Code used to run other applications</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Canvas" title="de/Code snippets/Canvas"><code>&lt;canvas&gt;</code> related</a> </dt><dd> <small><a href="/en/HTML/Canvas" title="en/HTML/Canvas">WHAT WG Canvas</a>-related code</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Signing%20a%20XPI" title="de/Signing a XPI">Signing a XPI</a> </dt><dd> <small>How to sign a XPI with PKI</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Threads" title="de/Code snippets/Threads">Threads</a> </dt><dd> <small>Performing background operations and delaying execution while background operations complete</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Miscellaneous" title="de/Code snippets/Miscellaneous">Miscellaneous</a> </dt><dd> <small>Miscellaneous useful code fragments</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/HTML%20to%20DOM" title="de/Code snippets/HTML to DOM">HTML to DOM</a> </dt><dd> <small>Using a hidden browser element to parse HTML to a window's DOM</small> </dd></dl>
<h3 name="Browser-oriented_code">Browser-oriented code</h3>
<dl><dt> <a class="internal" href="/de/Code%20snippets/Tabbed%20browser" title="de/Code snippets/Tabbed browser">Tabbed browser code</a> (Firefox/SeaMonkey) </dt><dd> <small>Basic operations, such as page loading, with the tabbed browser, which is the heart of Mozilla's browser applications</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Cookies" title="de/Code snippets/Cookies">Cookies</a> </dt><dd> <small>Reading, writing, modifying, and removing cookies</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Page%20Loading" title="de/Code snippets/Page Loading">Page Loading</a> </dt><dd> <small>Code used to load pages, reload pages, and listen for page loads</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Interaction%20between%20privileged%20and%20non-privileged%20pages" title="de/Code snippets/Interaction between privileged and non-privileged pages">Interaction between privileged and non-privileged code</a> </dt><dd> <small>How to communicate between extensions and websites and vice-versa.</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Downloading%20Files" title="de/Code snippets/Downloading Files">Downloading Files</a> </dt><dd> <small>Code to download files, images, and to monitor download progress</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Password%20Manager" title="de/Code snippets/Password Manager">Password Manager</a> </dt><dd> <small>Code used to read and write passwords to/from the integrated password manager</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Bookmarks" title="de/Code snippets/Bookmarks">Bookmarks</a> </dt><dd> <small>Code used to read and write bookmarks</small> </dd></dl>
<h3 name="SVG">SVG</h3>
<dl><dt> <a class="internal" href="/de/Code%20snippets/SVG%20General" title="de/Code snippets/SVG General"> General</a> </dt><dd> <small>General information and utilities</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/SVG%20Animation" title="de/Code snippets/SVG Animation"> SVG Animation</a> </dt><dd> <small>Animate SVG using JavaScript and SMIL</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/SVG%20Interacting%20with%20script" title="de/Code snippets/SVG Interacting with script"> SVG Interacting with Script</a> </dt><dd> <small>Using JavaScript and DOM events to create interactive SVG</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Embedding%20SVG" title="de/Code snippets/Embedding SVG"> Embedding SVG in HTML and XUL</a> </dt><dd> <small>Using SVG to enhance HTML or XUL based markup</small> </dd></dl>
<h3 name="XUL_Widgets">XUL Widgets</h3>
<dl><dt> <a class="internal" href="/de/Code%20snippets/Label%20and%20description" title="de/Code snippets/Label and description"> Label and description</a> </dt><dd> <small>Special uses and line breaking examples</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Tree" title="de/Code snippets/Tree"> Tree</a> </dt><dd> <small>Setup and manipulation of trees using XUL and JS</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Scrollbar" title="de/Code snippets/Scrollbar"> Scrollbar</a> </dt><dd> <small>Changing style of scrollbars. Applies to scrollbars in browser and iframe as well.</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Autocomplete" title="de/Code snippets/Autocomplete">Autocomplete</a> </dt><dd> <small>Code used to enable form autocomplete in a browser</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Code%20snippets/Boxes" title="de/Code snippets/Boxes"> Boxes</a> </dt><dd> <small>Tips and tricks when using boxes as containers</small> </dd></dl>
<h3 name="Windows-specific">Windows-specific</h3>
<dl><dt> <a class="internal" href="/de/Code%20snippets/Finding%20Window%20Handles" title="de/Code snippets/Finding Window Handles">Finding Window Handles (HWND)</a> (Firefox) </dt><dd> <small>How to use Windows API calls to find various kinds of Mozilla window handles. Window handles can be used for IPC and Accessibility purposes.</small> </dd></dl> <dl><dt> <a class="internal" href="/de/Accessing%20the%20Windows%20Registry%20Using%20XPCOM" title="de/Accessing the Windows Registry Using XPCOM">Using the Windows Registry with XPCOM</a> </dt><dd> <small>How to read, write, modify, delete, enumerate, and watch registry keys and values.</small> </dd></dl>
<h3 name="External_links">External links</h3>
<p>The content at <a class="external" href="http://kb.mozillazine.org/Category:Example_code">MozillaZine Example Code</a> is slowly being moved here, but you can still find useful examples there for now.</p>
<p>{{ languages( { "fr": "fr/Extraits_de_code", "ja": "ja/Code_snippets", "ko": "ko/Code_snippets", "pl": "pl/Fragmenty_kodu" } ) }}</p>
Zu dieser Version zurücksetzen