mirror of
https://github.com/MontFerret/ferret.git
synced 2025-06-23 00:28:10 +02:00
Next (#214)
* Renamed DOCUMENT to PAGE * Added PageLoadParams * Added PageLoadParams * Renamed LoadPageParams -> PageLoadParams * Added support for context.Done() (#201) * Bug/#189 operators precedence (#202) * Fixed math operators precedence * Fixed logical operators precedence * Fixed array operator * Added support for parentheses to enforce a different operator evaluation order * Feature/#200 drivers (#209) * Added new interfaces * Renamed dynamic to cdp driver * Renamed drivers * Added ELEMENT_EXISTS function (#210) * Renamed back PAGE to DOCUMENT (#211) * Added Getter and Setter interfaces
This commit is contained in:
@ -2,7 +2,7 @@ package html
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/html/dynamic"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
@ -32,7 +32,7 @@ func ScrollInto(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
}
|
||||
|
||||
// Document with a selector
|
||||
doc, ok := args[0].(*dynamic.HTMLDocument)
|
||||
doc, ok := args[0].(values.DHTMLDocument)
|
||||
|
||||
if !ok {
|
||||
return values.None, core.Errors(core.ErrInvalidType, ErrNotDynamic)
|
||||
@ -44,7 +44,7 @@ func ScrollInto(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
}
|
||||
|
||||
// Element
|
||||
el, ok := args[0].(*dynamic.HTMLElement)
|
||||
el, ok := args[0].(values.DHTMLNode)
|
||||
|
||||
if !ok {
|
||||
return values.None, core.Errors(core.ErrInvalidType, ErrNotDynamic)
|
||||
|
Reference in New Issue
Block a user