mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Update chromedp to fix console errors (#1521)
This commit is contained in:
85
vendor/github.com/chromedp/cdproto/runtime/runtime.go
generated
vendored
85
vendor/github.com/chromedp/cdproto/runtime/runtime.go
generated
vendored
@@ -293,19 +293,21 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// EvaluateParams evaluates expression on global object.
|
||||
type EvaluateParams struct {
|
||||
Expression string `json:"expression"` // Expression to evaluate.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
|
||||
IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ContextID ExecutionContextID `json:"contextId,omitempty"` // Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
|
||||
Timeout TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
|
||||
DisableBreaks bool `json:"disableBreaks,omitempty"` // Disable breakpoints during execution.
|
||||
ReplMode bool `json:"replMode,omitempty"` // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
|
||||
Expression string `json:"expression"` // Expression to evaluate.
|
||||
ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
|
||||
IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ContextID ExecutionContextID `json:"contextId,omitempty"` // Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with uniqueContextId, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
|
||||
Timeout TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
|
||||
DisableBreaks bool `json:"disableBreaks,omitempty"` // Disable breakpoints during execution.
|
||||
ReplMode bool `json:"replMode,omitempty"` // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
|
||||
AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,omitempty"` // The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
|
||||
UniqueContextID string `json:"uniqueContextId,omitempty"` // An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with contextId.
|
||||
}
|
||||
|
||||
// Evaluate evaluates expression on global object.
|
||||
@@ -343,7 +345,9 @@ func (p EvaluateParams) WithSilent(silent bool) *EvaluateParams {
|
||||
|
||||
// WithContextID specifies in which execution context to perform evaluation.
|
||||
// If the parameter is omitted the evaluation will be performed in the context
|
||||
// of the inspected page.
|
||||
// of the inspected page. This is mutually exclusive with uniqueContextId, which
|
||||
// offers an alternative way to identify the execution context that is more
|
||||
// reliable in a multi-process environment.
|
||||
func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams {
|
||||
p.ContextID = contextID
|
||||
return &p
|
||||
@@ -403,6 +407,27 @@ func (p EvaluateParams) WithReplMode(replMode bool) *EvaluateParams {
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithAllowUnsafeEvalBlockedByCSP the Content Security Policy (CSP) for the
|
||||
// target might block 'unsafe-eval' which includes eval(), Function(),
|
||||
// setTimeout() and setInterval() when called with non-callable arguments. This
|
||||
// flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to
|
||||
// true.
|
||||
func (p EvaluateParams) WithAllowUnsafeEvalBlockedByCSP(allowUnsafeEvalBlockedByCSP bool) *EvaluateParams {
|
||||
p.AllowUnsafeEvalBlockedByCSP = allowUnsafeEvalBlockedByCSP
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithUniqueContextID an alternative way to specify the execution context to
|
||||
// evaluate in. Compared to contextId that may be reused across processes, this
|
||||
// is guaranteed to be system-unique, so it can be used to prevent accidental
|
||||
// evaluation of the expression in context different than intended (e.g. as a
|
||||
// result of navigation across process boundaries). This is mutually exclusive
|
||||
// with contextId.
|
||||
func (p EvaluateParams) WithUniqueContextID(uniqueContextID string) *EvaluateParams {
|
||||
p.UniqueContextID = uniqueContextID
|
||||
return &p
|
||||
}
|
||||
|
||||
// EvaluateReturns return values.
|
||||
type EvaluateReturns struct {
|
||||
Result *RemoteObject `json:"result,omitempty"` // Evaluation result.
|
||||
@@ -866,23 +891,21 @@ func (p *TerminateExecutionParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// AddBindingParams if executionContextId is empty, adds binding with the
|
||||
// given name on the global objects of all inspected contexts, including those
|
||||
// created later, bindings survive reloads. If executionContextId is specified,
|
||||
// adds binding only on global object of given execution context. Binding
|
||||
// function takes exactly one argument, this argument should be string, in case
|
||||
// of any other input, function throws an exception. Each binding function call
|
||||
// produces Runtime.bindingCalled notification.
|
||||
// created later, bindings survive reloads. Binding function takes exactly one
|
||||
// argument, this argument should be string, in case of any other input,
|
||||
// function throws an exception. Each binding function call produces
|
||||
// Runtime.bindingCalled notification.
|
||||
type AddBindingParams struct {
|
||||
Name string `json:"name"`
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`
|
||||
Name string `json:"name"`
|
||||
ExecutionContextName string `json:"executionContextName,omitempty"` // If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also ExecutionContext.name and worldName parameter to Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive with executionContextId.
|
||||
}
|
||||
|
||||
// AddBinding if executionContextId is empty, adds binding with the given
|
||||
// name on the global objects of all inspected contexts, including those created
|
||||
// later, bindings survive reloads. If executionContextId is specified, adds
|
||||
// binding only on global object of given execution context. Binding function
|
||||
// takes exactly one argument, this argument should be string, in case of any
|
||||
// other input, function throws an exception. Each binding function call
|
||||
// produces Runtime.bindingCalled notification.
|
||||
// later, bindings survive reloads. Binding function takes exactly one argument,
|
||||
// this argument should be string, in case of any other input, function throws
|
||||
// an exception. Each binding function call produces Runtime.bindingCalled
|
||||
// notification.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-addBinding
|
||||
//
|
||||
@@ -894,9 +917,13 @@ func AddBinding(name string) *AddBindingParams {
|
||||
}
|
||||
}
|
||||
|
||||
// WithExecutionContextID [no description].
|
||||
func (p AddBindingParams) WithExecutionContextID(executionContextID ExecutionContextID) *AddBindingParams {
|
||||
p.ExecutionContextID = executionContextID
|
||||
// WithExecutionContextName if specified, the binding is exposed to the
|
||||
// executionContext with matching name, even for contexts created after the
|
||||
// binding is added. See also ExecutionContext.name and worldName parameter to
|
||||
// Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive
|
||||
// with executionContextId.
|
||||
func (p AddBindingParams) WithExecutionContextName(executionContextName string) *AddBindingParams {
|
||||
p.ExecutionContextName = executionContextName
|
||||
return &p
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user