Skip to content

Commit

Permalink
new chromium doesn't report ErrNoContentQuads
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Aug 3, 2022
1 parent db6d1d0 commit d51fc06
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
6 changes: 1 addition & 5 deletions element.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,7 @@ func (el *Element) Interactable() (pt *proto.Point, err error) {

shape, err := el.Shape()
if err != nil {
// such as when css is "display: none"
if errors.Is(err, cdp.ErrNoContentQuads) {
err = &ErrInvisibleShape{el}
}
return
return nil, err
}

pt = shape.OnePointInside()
Expand Down
6 changes: 0 additions & 6 deletions lib/cdp/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,3 @@ var ErrNodeNotFoundAtPos = &Error{
Code: -32000,
Message: "No node found at given location",
}

// ErrNoContentQuads type
var ErrNoContentQuads = &Error{
Code: -32000,
Message: "Could not compute content quads.",
}

0 comments on commit d51fc06

Please sign in to comment.