1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-06-19 00:18:00 +02:00

Moved html drivers outside of standard library

This commit is contained in:
Tim Voronov
2018-10-07 21:32:30 -04:00
parent 957490efec
commit 03d9f2e561
31 changed files with 40 additions and 42 deletions

View File

@ -2,9 +2,9 @@ package html
import (
"context"
"github.com/MontFerret/ferret/pkg/html"
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
"github.com/MontFerret/ferret/pkg/stdlib/html/driver"
)
/*
@ -37,12 +37,12 @@ func Document(ctx context.Context, args ...core.Value) (core.Value, error) {
dynamic = args[1].(values.Boolean)
}
var drv driver.Driver
var drv html.Driver
if !dynamic {
drv, err = driver.FromContext(ctx, driver.Static)
drv, err = html.FromContext(ctx, html.Static)
} else {
drv, err = driver.FromContext(ctx, driver.Dynamic)
drv, err = html.FromContext(ctx, html.Dynamic)
}
if err != nil {