This repository has been archived by the owner on Dec 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdom.d.ts
55 lines (47 loc) · 1.73 KB
/
dom.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
declare module "@qualweb/dom" {
import { QualwebOptions, PageOptions } from "@qualweb/core";
import { HTMLValidationReport } from "@qualweb/html-validator";
import { Page, Viewport } from "puppeteer";
interface DomData {
html: string;
title?: string;
elementCount?: number;
}
interface PageData {
sourceHtml: string;
validation?: HTMLValidationReport;
}
class Dom {
private readonly page: Page;
private readonly endpoint: string;
constructor(page: Page, validator?: string);
public process(
options: QualwebOptions,
url: string,
html: string
): Promise<PageData>;
private removeUrlAnchor(url: string): string;
private navigateToPage(
url: string,
options: QualwebOptions
): Promise<Response | null>;
private setPageViewport(options?: PageOptions): Promise<void>;
private createViewportObject(options: PageOptions): Viewport;
private getSourceHtml(url: string, options?: PageOptions): Promise<string>;
private getValidatorResult(
url: string
): Promise<HTMLValidationReport | undefined>;
private validatorNeeded(options: QualwebOptions): boolean;
private isModuleSetToExecute(
options: QualwebOptions,
module: string
): boolean;
private moduleIncludesValidatorTechnique(options: QualwebOptions): boolean;
private moduleExcludesValidatorTechnique(options: QualwebOptions): boolean;
private sourceHTMLNeeded(options: QualwebOptions): boolean;
private moduleIncludesSourceCodeRule(options: QualwebOptions): boolean;
private moduleExcludesSourceCodeRule(options: QualwebOptions): boolean;
private isHtmlDocument(content?: string, url?: string): boolean;
}
export { Dom, PageData, DomData };
}