Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  head.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


async function newTabWithPiP(requestOptions = {}) {
  // Create a tab that can use the API (secure context)
  const tab = await BrowserTestUtils.openNewForegroundTab({
    gBrowser,
    opening: "https://example.com",
    waitForLoad: true,
  });
  const browser = tab.linkedBrowser;

  // Open a document PiP window
  const chromePiPPromise = BrowserTestUtils.waitForNewWindow();
  await SpecialPowers.spawn(browser, [requestOptions], async options => {
    content.document.notifyUserGestureActivation();
    await content.documentPictureInPicture.requestWindow(options);
  });
  const chromePiP = await chromePiPPromise;

  return [tab, chromePiP];
}

// Move pip and wait till content was notified
async function movePiP(chromePiP, { x, y }) {
  const browser = chromePiP.gBrowser.selectedBrowser;

  // Store a promise in content for when it was notified of this move
  await SpecialPowers.spawn(browser, [x, y], async (_x, _y) => {
    const obs = SpecialPowers.Services.obs;
    const topic = "docshell-position-size-changed";
    content.__observerPromise = new Promise(resolve => {
      function notify() {
        if (content.screenX == _x && content.screenY == _y) {
          obs.removeObserver(notify, topic);
          resolve();
        }
      }
      obs.addObserver(notify, topic);
    });
  });

  chromePiP.moveTo(x, y);

  // Wait for the previously created promise
  await SpecialPowers.spawn(browser, [], async () => {
    await content.__observerPromise;
    delete content.__observerPromise;
  });
}

Messung V0.5 in Prozent
C=73 H=100 G=87

¤ Dauer der Verarbeitung: 0.4 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