Skip to content

Commit

Permalink
chore: fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lino-levan committed Feb 12, 2024
1 parent 34bc70d commit ab2ee90
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ jobs:
- name: Install Deno
uses: denoland/setup-deno@v1

- name: Vendor packages
run: deno vendor **/*.ts

- name: Publish package
run: deno publish
3 changes: 1 addition & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"jsx": "react-jsx",
"jsxImportSource": "https://esm.sh/[email protected]"
},
"lock": false,
"importMap": "./vendor/import_map.json"
"lock": false
}
5 changes: 4 additions & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ export class Browser {
/**
* Promise which resolves to a new `Page` object.
*/
async newPage(url?: string, options?: WaitForOptions & SandboxOptions): Promise<Page> {
async newPage(
url?: string,
options?: WaitForOptions & SandboxOptions,
): Promise<Page> {
const { targetId } = await this.#celestial.Target.createTarget({
url: "",
});
Expand Down
9 changes: 7 additions & 2 deletions src/element_handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ export class ElementHandle {
/**
* This method scrolls element into view if needed, and then uses `Page.screenshot()` to take a screenshot of the element.
*/
async screenshot(opts?: Omit<ScreenshotOptions, "clip">): Promise<Uint8Array> {
async screenshot(
opts?: Omit<ScreenshotOptions, "clip">,
): Promise<Uint8Array> {
await this.scrollIntoView();
const box = await this.boundingBox();

Expand Down Expand Up @@ -305,7 +307,10 @@ export class ElementHandle {
/**
* Wait for an element matching the given selector to appear in the current element.
*/
async waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<ElementHandle> {
async waitForSelector(
selector: string,
options?: WaitForSelectorOptions,
): Promise<ElementHandle> {
// TODO(lino-levan): Make this easier to read, it's a little scuffed
try {
return await deadline<ElementHandle>(
Expand Down
5 changes: 4 additions & 1 deletion src/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,10 @@ export class Page extends EventTarget {
* await page.waitForSelector(".class");
* ```
*/
async waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<ElementHandle> {
async waitForSelector(
selector: string,
options?: WaitForSelectorOptions,
): Promise<ElementHandle> {
const root = await this.#getRoot();
return root.waitForSelector(selector, options);
}
Expand Down

0 comments on commit ab2ee90

Please sign in to comment.