UNPKG
astro-tina
Version:
latest (0.1.3)
0.1.3
0.1.2
0.1.1
Support contextual editing with TinaCMS in static Astro sites.
astro-tina
/
dist
/
client-tina.js
13 lines
(12 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
const
clientTina
= (
load
) => {
try
{
const
isEditor =
window
.
frameElement
&&
window
.
frameElement
.
id
===
'tina-iframe'
;
if
(isEditor) {
load
().
then
(
(
hydrate
) =>
hydrate
()); } }
catch
(e) {
console
.
error
(e); } };
export
default
clientTina;