// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://github.com/WICG/web-printing
enum WebPrintJobState {
"preliminary",
"pending",
"processing",
"completed",
"canceled",
"aborted"
};
dictionary WebPrintJobAttributes {
DOMString jobName;
unsigned long jobPages;
unsigned long jobPagesCompleted;
WebPrintJobState jobState;
};
[
ActiveScriptWrappable,
Exposed=Window,
RuntimeEnabled=WebPrinting,
SecureContext,
IsolatedContext
]
interface WebPrintJob : EventTarget {
[MeasureAs=WebPrintJobAttributesFunction]
WebPrintJobAttributes attributes();
[MeasureAs=WebPrintJobCancelFunction]
void cancel();
[MeasureAs=WebPrintJobOnJobStateChangeEvent]
attribute EventHandler onjobstatechange;
};