mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: remove sort comments (#12237)
This commit is contained in:
parent
5143b31ff9
commit
60e15fe5c5
@ -51,20 +51,17 @@ export class Browser extends EventEmitter<{
|
|||||||
return browser;
|
return browser;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#closed = false;
|
#closed = false;
|
||||||
#reason: string | undefined;
|
#reason: string | undefined;
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
readonly #userContexts = new Map<string, UserContext>();
|
readonly #userContexts = new Map<string, UserContext>();
|
||||||
readonly session: Session;
|
readonly session: Session;
|
||||||
readonly #sharedWorkers = new Map<string, SharedWorkerRealm>();
|
readonly #sharedWorkers = new Map<string, SharedWorkerRealm>();
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(session: Session) {
|
private constructor(session: Session) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.session = session;
|
this.session = session;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async #initialize() {
|
async #initialize() {
|
||||||
@ -141,7 +138,6 @@ export class Browser extends EventEmitter<{
|
|||||||
return userContext;
|
return userContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get closed(): boolean {
|
get closed(): boolean {
|
||||||
return this.#closed;
|
return this.#closed;
|
||||||
}
|
}
|
||||||
@ -158,7 +154,6 @@ export class Browser extends EventEmitter<{
|
|||||||
get userContexts(): Iterable<UserContext> {
|
get userContexts(): Iterable<UserContext> {
|
||||||
return this.#userContexts.values();
|
return this.#userContexts.values();
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
dispose(reason?: string, closed = false): void {
|
dispose(reason?: string, closed = false): void {
|
||||||
|
@ -129,7 +129,6 @@ export class BrowsingContext extends EventEmitter<{
|
|||||||
return browsingContext;
|
return browsingContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#navigation: Navigation | undefined;
|
#navigation: Navigation | undefined;
|
||||||
#reason?: string;
|
#reason?: string;
|
||||||
#url: string;
|
#url: string;
|
||||||
@ -141,7 +140,6 @@ export class BrowsingContext extends EventEmitter<{
|
|||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly parent: BrowsingContext | undefined;
|
readonly parent: BrowsingContext | undefined;
|
||||||
readonly userContext: UserContext;
|
readonly userContext: UserContext;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(
|
private constructor(
|
||||||
context: UserContext,
|
context: UserContext,
|
||||||
@ -150,12 +148,11 @@ export class BrowsingContext extends EventEmitter<{
|
|||||||
url: string
|
url: string
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.#url = url;
|
this.#url = url;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.userContext = context;
|
this.userContext = context;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
this.defaultRealm = this.#createWindowRealm();
|
this.defaultRealm = this.#createWindowRealm();
|
||||||
}
|
}
|
||||||
@ -283,7 +280,6 @@ export class BrowsingContext extends EventEmitter<{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get #session() {
|
get #session() {
|
||||||
return this.userContext.browser.session;
|
return this.userContext.browser.session;
|
||||||
}
|
}
|
||||||
@ -314,7 +310,6 @@ export class BrowsingContext extends EventEmitter<{
|
|||||||
get url(): string {
|
get url(): string {
|
||||||
return this.#url;
|
return this.#url;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
#createWindowRealm(sandbox?: string) {
|
#createWindowRealm(sandbox?: string) {
|
||||||
const realm = WindowRealm.from(this, sandbox);
|
const realm = WindowRealm.from(this, sandbox);
|
||||||
|
@ -38,19 +38,16 @@ export class Navigation extends EventEmitter<{
|
|||||||
return navigation;
|
return navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#request: Request | undefined;
|
#request: Request | undefined;
|
||||||
#navigation: Navigation | undefined;
|
#navigation: Navigation | undefined;
|
||||||
readonly #browsingContext: BrowsingContext;
|
readonly #browsingContext: BrowsingContext;
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
#id?: string | null;
|
#id?: string | null;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(context: BrowsingContext) {
|
private constructor(context: BrowsingContext) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.#browsingContext = context;
|
this.#browsingContext = context;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#initialize() {
|
#initialize() {
|
||||||
@ -151,7 +148,6 @@ export class Navigation extends EventEmitter<{
|
|||||||
return this.#id === navigation;
|
return this.#id === navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get #session() {
|
get #session() {
|
||||||
return this.#browsingContext.userContext.browser.session;
|
return this.#browsingContext.userContext.browser.session;
|
||||||
}
|
}
|
||||||
@ -164,7 +160,6 @@ export class Navigation extends EventEmitter<{
|
|||||||
get navigation(): Navigation | undefined {
|
get navigation(): Navigation | undefined {
|
||||||
return this.#navigation;
|
return this.#navigation;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
private dispose(): void {
|
private dispose(): void {
|
||||||
|
@ -44,23 +44,19 @@ export abstract class Realm extends EventEmitter<{
|
|||||||
/** Emitted when a shared worker is created in the realm. */
|
/** Emitted when a shared worker is created in the realm. */
|
||||||
sharedworker: SharedWorkerRealm;
|
sharedworker: SharedWorkerRealm;
|
||||||
}> {
|
}> {
|
||||||
// keep-sorted start
|
|
||||||
#reason?: string;
|
#reason?: string;
|
||||||
protected readonly disposables = new DisposableStack();
|
protected readonly disposables = new DisposableStack();
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly origin: string;
|
readonly origin: string;
|
||||||
protected executionContextId?: number;
|
protected executionContextId?: number;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
protected constructor(id: string, origin: string) {
|
protected constructor(id: string, origin: string) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.origin = origin;
|
this.origin = origin;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get disposed(): boolean {
|
get disposed(): boolean {
|
||||||
return this.#reason !== undefined;
|
return this.#reason !== undefined;
|
||||||
}
|
}
|
||||||
@ -68,7 +64,6 @@ export abstract class Realm extends EventEmitter<{
|
|||||||
get target(): Bidi.Script.Target {
|
get target(): Bidi.Script.Target {
|
||||||
return {realm: this.id};
|
return {realm: this.id};
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
protected dispose(reason?: string): void {
|
protected dispose(reason?: string): void {
|
||||||
@ -159,19 +154,16 @@ export class WindowRealm extends Realm {
|
|||||||
return realm;
|
return realm;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
readonly browsingContext: BrowsingContext;
|
readonly browsingContext: BrowsingContext;
|
||||||
readonly sandbox?: string;
|
readonly sandbox?: string;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
||||||
|
|
||||||
private constructor(context: BrowsingContext, sandbox?: string) {
|
private constructor(context: BrowsingContext, sandbox?: string) {
|
||||||
super('', '');
|
super('', '');
|
||||||
// keep-sorted start
|
|
||||||
this.browsingContext = context;
|
this.browsingContext = context;
|
||||||
this.sandbox = sandbox;
|
this.sandbox = sandbox;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#initialize(): void {
|
#initialize(): void {
|
||||||
@ -248,10 +240,8 @@ export class DedicatedWorkerRealm extends Realm {
|
|||||||
return realm;
|
return realm;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
||||||
readonly owners: Set<DedicatedWorkerOwnerRealm>;
|
readonly owners: Set<DedicatedWorkerOwnerRealm>;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(
|
private constructor(
|
||||||
owner: DedicatedWorkerOwnerRealm,
|
owner: DedicatedWorkerOwnerRealm,
|
||||||
@ -306,10 +296,8 @@ export class SharedWorkerRealm extends Realm {
|
|||||||
return realm;
|
return realm;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
readonly #workers = new Map<string, DedicatedWorkerRealm>();
|
||||||
readonly browser: Browser;
|
readonly browser: Browser;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(browser: Browser, id: string, origin: string) {
|
private constructor(browser: Browser, id: string, origin: string) {
|
||||||
super(id, origin);
|
super(id, origin);
|
||||||
|
@ -32,24 +32,21 @@ export class Request extends EventEmitter<{
|
|||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#error?: string;
|
#error?: string;
|
||||||
#redirect?: Request;
|
#redirect?: Request;
|
||||||
#response?: Bidi.Network.ResponseData;
|
#response?: Bidi.Network.ResponseData;
|
||||||
readonly #browsingContext: BrowsingContext;
|
readonly #browsingContext: BrowsingContext;
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
readonly #event: Bidi.Network.BeforeRequestSentParameters;
|
readonly #event: Bidi.Network.BeforeRequestSentParameters;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(
|
private constructor(
|
||||||
browsingContext: BrowsingContext,
|
browsingContext: BrowsingContext,
|
||||||
event: Bidi.Network.BeforeRequestSentParameters
|
event: Bidi.Network.BeforeRequestSentParameters
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.#browsingContext = browsingContext;
|
this.#browsingContext = browsingContext;
|
||||||
this.#event = event;
|
this.#event = event;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#initialize() {
|
#initialize() {
|
||||||
@ -107,7 +104,6 @@ export class Request extends EventEmitter<{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get #session() {
|
get #session() {
|
||||||
return this.#browsingContext.userContext.browser.session;
|
return this.#browsingContext.userContext.browser.session;
|
||||||
}
|
}
|
||||||
@ -154,7 +150,6 @@ export class Request extends EventEmitter<{
|
|||||||
get isBlocked(): boolean {
|
get isBlocked(): boolean {
|
||||||
return this.#event.isBlocked;
|
return this.#event.isBlocked;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
async continueRequest({
|
async continueRequest({
|
||||||
url,
|
url,
|
||||||
|
@ -81,21 +81,18 @@ export class Session
|
|||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#reason: string | undefined;
|
#reason: string | undefined;
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
readonly #info: Bidi.Session.NewResult;
|
readonly #info: Bidi.Session.NewResult;
|
||||||
readonly browser!: Browser;
|
readonly browser!: Browser;
|
||||||
@bubble()
|
@bubble()
|
||||||
accessor connection: Connection;
|
accessor connection: Connection;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(connection: Connection, info: Bidi.Session.NewResult) {
|
private constructor(connection: Connection, info: Bidi.Session.NewResult) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.#info = info;
|
this.#info = info;
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async #initialize(): Promise<void> {
|
async #initialize(): Promise<void> {
|
||||||
@ -121,7 +118,6 @@ export class Session
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get capabilities(): Bidi.Session.NewResult['capabilities'] {
|
get capabilities(): Bidi.Session.NewResult['capabilities'] {
|
||||||
return this.#info.capabilities;
|
return this.#info.capabilities;
|
||||||
}
|
}
|
||||||
@ -134,7 +130,6 @@ export class Session
|
|||||||
get id(): string {
|
get id(): string {
|
||||||
return this.#info.sessionId;
|
return this.#info.sessionId;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
private dispose(reason?: string): void {
|
private dispose(reason?: string): void {
|
||||||
|
@ -52,21 +52,18 @@ export class UserContext extends EventEmitter<{
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#reason?: string;
|
#reason?: string;
|
||||||
// Note these are only top-level contexts.
|
// Note these are only top-level contexts.
|
||||||
readonly #browsingContexts = new Map<string, BrowsingContext>();
|
readonly #browsingContexts = new Map<string, BrowsingContext>();
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
readonly #id: string;
|
readonly #id: string;
|
||||||
readonly browser: Browser;
|
readonly browser: Browser;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(browser: Browser, id: string) {
|
private constructor(browser: Browser, id: string) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.#id = id;
|
this.#id = id;
|
||||||
this.browser = browser;
|
this.browser = browser;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#initialize() {
|
#initialize() {
|
||||||
@ -110,7 +107,6 @@ export class UserContext extends EventEmitter<{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get #session() {
|
get #session() {
|
||||||
return this.browser.session;
|
return this.browser.session;
|
||||||
}
|
}
|
||||||
@ -126,7 +122,6 @@ export class UserContext extends EventEmitter<{
|
|||||||
get id(): string {
|
get id(): string {
|
||||||
return this.#id;
|
return this.#id;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
private dispose(reason?: string): void {
|
private dispose(reason?: string): void {
|
||||||
|
@ -49,23 +49,20 @@ export class UserPrompt extends EventEmitter<{
|
|||||||
return userPrompt;
|
return userPrompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start
|
|
||||||
#reason?: string;
|
#reason?: string;
|
||||||
#result?: UserPromptResult;
|
#result?: UserPromptResult;
|
||||||
readonly #disposables = new DisposableStack();
|
readonly #disposables = new DisposableStack();
|
||||||
readonly browsingContext: BrowsingContext;
|
readonly browsingContext: BrowsingContext;
|
||||||
readonly info: Bidi.BrowsingContext.UserPromptOpenedParameters;
|
readonly info: Bidi.BrowsingContext.UserPromptOpenedParameters;
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
private constructor(
|
private constructor(
|
||||||
context: BrowsingContext,
|
context: BrowsingContext,
|
||||||
info: Bidi.BrowsingContext.UserPromptOpenedParameters
|
info: Bidi.BrowsingContext.UserPromptOpenedParameters
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
// keep-sorted start
|
|
||||||
this.browsingContext = context;
|
this.browsingContext = context;
|
||||||
this.info = info;
|
this.info = info;
|
||||||
// keep-sorted end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#initialize() {
|
#initialize() {
|
||||||
@ -89,7 +86,6 @@ export class UserPrompt extends EventEmitter<{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep-sorted start block=yes
|
|
||||||
get #session() {
|
get #session() {
|
||||||
return this.browsingContext.userContext.browser.session;
|
return this.browsingContext.userContext.browser.session;
|
||||||
}
|
}
|
||||||
@ -105,7 +101,6 @@ export class UserPrompt extends EventEmitter<{
|
|||||||
get result(): UserPromptResult | undefined {
|
get result(): UserPromptResult | undefined {
|
||||||
return this.#result;
|
return this.#result;
|
||||||
}
|
}
|
||||||
// keep-sorted end
|
|
||||||
|
|
||||||
@inertIfDisposed
|
@inertIfDisposed
|
||||||
private dispose(reason?: string): void {
|
private dispose(reason?: string): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user