Skip to content

Commit b1b83a1

Browse files
don't require experimental: true for iframes (#913)
1 parent 64f728c commit b1b83a1

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.changeset/quiet-games-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
move iframe out of 'experimental'

lib/StagehandPage.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
HandlerNotInitializedError,
2929
StagehandDefaultError,
3030
ExperimentalApiConflictError,
31-
ExperimentalNotConfiguredError,
3231
} from "../types/stagehandErrors";
3332
import { StagehandAPIError } from "@/types/stagehandApiErrors";
3433
import { scriptContent } from "@/lib/dom/build/scriptContent";
@@ -633,9 +632,6 @@ ${scriptContent} \
633632
// If actionOrOptions is an ObserveResult, we call actFromObserveResult.
634633
// We need to ensure there is both a selector and a method in the ObserveResult.
635634
if (typeof actionOrOptions === "object" && actionOrOptions !== null) {
636-
if ("iframes" in actionOrOptions && !this.stagehand.experimental) {
637-
throw new ExperimentalNotConfiguredError("iframes");
638-
}
639635
// If it has selector AND method => treat as ObserveResult
640636
if ("selector" in actionOrOptions && "method" in actionOrOptions) {
641637
const observeResult = actionOrOptions as ObserveResult;
@@ -770,10 +766,6 @@ ${scriptContent} \
770766
iframes,
771767
} = options;
772768

773-
if (iframes !== undefined && !this.stagehand.experimental) {
774-
throw new ExperimentalNotConfiguredError("iframes");
775-
}
776-
777769
if (this.api) {
778770
const opts = { ...options, frameId: this.frameId };
779771
const result = await this.api.extract<T>(opts);
@@ -878,10 +870,6 @@ ${scriptContent} \
878870
iframes,
879871
} = options;
880872

881-
if (iframes !== undefined && !this.stagehand.experimental) {
882-
throw new ExperimentalNotConfiguredError("iframes");
883-
}
884-
885873
if (this.api) {
886874
const opts = { ...options, frameId: this.frameId };
887875
const result = await this.api.observe(opts);

0 commit comments

Comments
 (0)