タグ

ブックマーク / developer.mozilla.org (5)

  • 交差オブザーバー API による要素の表示時間設定 - Web API | MDN

    この記事では、ページのコンテンツ間に多数の広告が散在している模擬ブログを作成し、その後交差オブザーバー API を使用して、各広告がユーザーに表示される時間を追跡します。表示時間の 1 分を超えた広告は、新しい広告と置き換えられます。 この例の多くの側面は実際の使用状況とは一致しませんが(特に記事はすべて同じテキストであり、データベースからは読み込まれません。また、ほんの一握りの単なるテキストのみの広告が配列から選択されます)、これは自分のサイトに交差オブザーバー API を適用する方法をすばやく学ぶために十分な API を理解できるようにするためです。 この例で、広告の表示状況を追跡するという概念が使用されているのには、それなりの理由があります。ウェブ上の広告で Flash やその他のスクリプトを最もよく使用するのは、課金や収益の支払いのために、それぞれの広告が表示されている時間を記録す

    交差オブザーバー API による要素の表示時間設定 - Web API | MDN
    uretaro
    uretaro 2019/03/28
    既存の広告を置き換える, 広告のタイマーを描画する
  • Payment Request API - Web APIs | MDN

    Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The Payment Request API provides a consistent user experience for merchants and users. It is not a new way of paying for things; instead, it's a way for users to select their preferred way of paying for things and make that information available to a merchant. Many problems related to onl

    Payment Request API - Web APIs | MDN
    uretaro
    uretaro 2017/09/25
  • Headless mode - Mozilla | MDN

    Since Firefox 57, the --screenshot flag allows you to take screenshots of websites. The basic usage is as follows: /path/to/firefox -P my-profile -headless --screenshot https://developer.mozilla.org/ This creates a full-height screenshot of https://developer.mozilla.com/en-US/ called screenshot.png, in the active directory, with a viewport width of 800px. You can omit -headless when using --screen

    Headless mode - Mozilla | MDN
    uretaro
    uretaro 2017/08/31
  • ネットワーク情報 API - Web API | MDN

    let type = navigator.connection.effectiveType; function updateConnectionStatus() { console.log( `接続の種類が ${type} から ${navigator.connection.effectiveType} に変化`, ); type = navigator.connection.effectiveType; } navigator.connection.addEventListener("change", updateConnectionStatus); 接続オブジェクトは、大きな帯域幅やメモリが使われるリソースを事前読み込みするかどうか決める場合に便利です。以下の例は、ページの読み込み直後に呼び出され、動画の事前読み込みが望ましくない場合の接続の種類を確かめます。携帯電話回線接続が見つかる

    ネットワーク情報 API - Web API | MDN
    uretaro
    uretaro 2017/03/22
    "システムのネットワーク接続に関する情報を、一般的な接続タイプ (例: 'wifi' や 'cellular' など) の観点から提供します。"
  • shape-rendering - SVG: Scalable Vector Graphics | MDN

    SVG Tutorials Introducing SVG from scratch Introduction Getting started Positions Basic shapes Paths Fills and Strokes Gradients in SVG Patterns Texts Basic transformations Clipping and masking Other content in SVG Filter effects SVG fonts SVG image element Tools for SVG SVG and CSS Reference Elements <a><animate><animateMotion><animateTransform><circle><clipPath><cursor> Deprecated <defs><desc><e

    shape-rendering - SVG: Scalable Vector Graphics | MDN
  • 1