WebAPI/WebPrintAPI: Difference between revisions

Add a note to indicate the content is outdated and no plans exist to implement the proposed API.
(Add a note to indicate the content is outdated and no plans exist to implement the proposed API.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Outdated}}
= First iteration: WebPrintAPI =
= First iteration: WebPrintAPI =


Line 23: Line 25:
* Should there be additional onBeforePrint/onAfterPrint callbacks on the PrintDocument object, or are the window.onBeforePrint/onAfterPrint events enough?
* Should there be additional onBeforePrint/onAfterPrint callbacks on the PrintDocument object, or are the window.onBeforePrint/onAfterPrint events enough?
* This proposal assumes the print page size is passed during the PrintDocument constructor. A different way is to get the page size from the current selected printer's page size. Defining the page size once makes things easier but makes this API on the other side less powerful.
* This proposal assumes the print page size is passed during the PrintDocument constructor. A different way is to get the page size from the current selected printer's page size. Defining the page size once makes things easier but makes this API on the other side less powerful.
* Should there be points2cm, points2inch, inches2points utility functions?
* Lot more... TBD
* Lot more... TBD


Line 177: Line 180:
     // rendering context for preview?
     // rendering context for preview?
     readonly attribute boolean isPreview;
     readonly attribute boolean isPreview;
   
    // dpi resolution. 0.0 = not defined.
    readonly attribute double dpi;
      
      
     // tell the backend that this page has finished rendering.
     // tell the backend that this page has finished rendering.
Line 307: Line 313:


Some basic investigation in the Gecko codebase. No code written so far.
Some basic investigation in the Gecko codebase. No code written so far.
[[Category:Web APIs]]
49

edits