From 6ba41dfcbef8c6adaeb646a0d3a38e161e12a0b8 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Sat, 13 May 2023 11:11:52 +0300 Subject: [PATCH] docs: update docs --- src/pages/docs.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pages/docs.tsx b/src/pages/docs.tsx index 5dc5816..fbbd45a 100644 --- a/src/pages/docs.tsx +++ b/src/pages/docs.tsx @@ -2,6 +2,7 @@ import React from "react"; import dynamic from "next/dynamic"; import Head from "next/head"; import styled from "styled-components"; +import { Text } from "@mantine/core"; import materialDark from "react-syntax-highlighter/dist/cjs/styles/prism/material-dark"; import Layout from "src/layout/Layout"; @@ -148,16 +149,14 @@ const Docs = () => {

◼︎ On Page Load

- + ⚠️ Important! - iframe should be defined before the script tag - - - ⚠️ Note - postMessage should be delayed using setTimeout - - To display JSON on load event, you should post json into iframe using it's onload - event like in the example. Make sure to use{" "} - setTimeout when loading data and set a time around - 500ms otherwise it won't work. + + + ⚠️ Note - Widget is not loaded immediately with the parent page. The widget + sends its id attribute so you can listen for it as in the example below to + ensure its loaded and ready to listen for messages. +