diff --git a/src/components/micro-frame-slot/marko-tag.json b/src/components/micro-frame-slot/marko-tag.json index ce5d990..99c6c89 100644 --- a/src/components/micro-frame-slot/marko-tag.json +++ b/src/components/micro-frame-slot/marko-tag.json @@ -50,6 +50,14 @@ } ] }, + "@no-refresh": { + "type": "boolean", + "autocomplete": [ + { + "description": "Flag to disable slot content refresh after stream src change." + } + ] + }, "@class": { "autocomplete": [ { diff --git a/src/components/micro-frame-sse/README.md b/src/components/micro-frame-sse/README.md index c2c6d71..c067fe5 100644 --- a/src/components/micro-frame-sse/README.md +++ b/src/components/micro-frame-sse/README.md @@ -254,6 +254,10 @@ Optional `style` attribute which works the same way as [Marko style attribute](h ``` +## `no-refresh` + +Boolean value controls whether the slot should refresh when its stream source src change. + # Communicating between host and child Communicating between host and child works the same way as [micro-frame](../../../README.md). diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html new file mode 100644 index 0000000..721429b --- /dev/null +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html @@ -0,0 +1,19 @@ +
+ Host app +
+ +
+
+
\ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html new file mode 100644 index 0000000..99f8541 --- /dev/null +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html @@ -0,0 +1,23 @@ +
+ Host app +
+ +
+
+
+

+ test_html for slot_1 +

+
\ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html new file mode 100644 index 0000000..808df14 --- /dev/null +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html @@ -0,0 +1,24 @@ +
+ Host app +
+ +
+
+
+

+ test_html for slot_1 +

+ next chunk for slot_1 +
\ No newline at end of file diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html new file mode 100644 index 0000000..e84c2eb --- /dev/null +++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html @@ -0,0 +1,48 @@ +
+ Host app +
+ +
+
+
+

+ test_html for slot_1 +

+ next chunk for slot_1 +
+
+

+ test_html for slot_2 +

+
+ +