mirror of
https://github.com/MontFerret/ferret.git
synced 2025-06-23 00:28:10 +02:00
Added Context to HTML methods (#235)
* Added Context to HTML methods * Fixed unit tests * Updated timeout * Fixed WAIT_CLASS timeout
This commit is contained in:
@ -13,7 +13,7 @@ import (
|
||||
// @param doc (HTMLDocument|HTMLElement) - Parent document or element.
|
||||
// @param selector (String) - String of CSS selector.
|
||||
// @returns (String) - An array of inner HTML strings if any element found, otherwise empty array.
|
||||
func InnerHTMLAll(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
func InnerHTMLAll(ctx context.Context, args ...core.Value) (core.Value, error) {
|
||||
err := core.ValidateArgs(args, 2, 2)
|
||||
|
||||
if err != nil {
|
||||
@ -40,5 +40,5 @@ func InnerHTMLAll(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
|
||||
selector := args[1].(values.String)
|
||||
|
||||
return el.InnerHTMLBySelectorAll(selector), nil
|
||||
return el.InnerHTMLBySelectorAll(ctx, selector), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user