[{"data":1,"prerenderedAt":1232},["ShallowReactive",2],{"docs-nav":3,"docs-\u002Fdocs\u002Fsdk\u002Fusage":70},[4,10,14,19,23,26,29,33,36,40,43,47,50,54,58,62,66],{"title":5,"path":6,"order":7,"section":8,"group":9},"Concepts","\u002Fdocs\u002Fapi\u002Fconcepts",1,"api",null,{"title":11,"path":12,"order":7,"section":13,"group":9},"Introduction","\u002Fdocs","general",{"title":15,"path":16,"order":7,"section":17,"group":18},"Usage","\u002Fdocs\u002Fsdk\u002Fusage","sdk","Script",{"title":20,"path":21,"order":22,"section":8,"group":9},"\u002Fv1\u002Fme","\u002Fdocs\u002Fapi\u002Fme",2,{"title":24,"path":25,"order":22,"section":13,"group":9},"Getting started","\u002Fdocs\u002Fgetting-started",{"title":24,"path":27,"order":22,"section":17,"group":28},"\u002Fdocs\u002Fsdk\u002Fpackage","Package",{"title":30,"path":31,"order":32,"section":8,"group":9},"\u002Fv1\u002Fsubscribe","\u002Fdocs\u002Fapi\u002Fsubscribe",3,{"title":34,"path":35,"order":32,"section":17,"group":28},"Browser client","\u002Fdocs\u002Fsdk\u002Fpackage\u002Fclient",{"title":37,"path":38,"order":39,"section":8,"group":9},"\u002Fv1\u002Funsubscribe","\u002Fdocs\u002Fapi\u002Funsubscribe",4,{"title":41,"path":42,"order":39,"section":17,"group":28},"Server client","\u002Fdocs\u002Fsdk\u002Fpackage\u002Fserver",{"title":44,"path":45,"order":46,"section":8,"group":9},"\u002Fv1\u002Fevents","\u002Fdocs\u002Fapi\u002Fevents",5,{"title":48,"path":49,"order":46,"section":17,"group":28},"Types","\u002Fdocs\u002Fsdk\u002Fpackage\u002Ftypes",{"title":51,"path":52,"order":53,"section":8,"group":9},"\u002Fv1\u002Fsend","\u002Fdocs\u002Fapi\u002Fsend",6,{"title":55,"path":56,"order":57,"section":8,"group":9},"\u002Fv1\u002Fbroadcasts","\u002Fdocs\u002Fapi\u002Fbroadcasts",7,{"title":59,"path":60,"order":61,"section":8,"group":9},"\u002Fv1\u002Fgroups","\u002Fdocs\u002Fapi\u002Fgroups",8,{"title":63,"path":64,"order":65,"section":8,"group":9},"\u002Fv1\u002Fsubscribers","\u002Fdocs\u002Fapi\u002Fsubscribers",9,{"title":67,"path":68,"order":69,"section":8,"group":9},"Webhooks","\u002Fdocs\u002Fapi\u002Fwebhooks",10,{"id":71,"title":15,"apiModule":9,"body":72,"description":1225,"extension":1226,"generated":1227,"group":18,"meta":1228,"navigation":704,"order":7,"path":16,"section":17,"seo":1229,"stem":1230,"__hash__":1231},"docs\u002Fdocs\u002Fsdk\u002Fusage.md",{"type":73,"value":74,"toc":1213},"minimark",[75,80,89,94,177,238,242,258,265,272,344,347,401,416,422,444,450,460,482,488,494,569,575,581,638,644,647,651,665,923,926,930,960,969,1202,1210],[76,77,79],"h1",{"id":78},"browser-sdk","Browser SDK",[81,82,83,84,88],"p",{},"The SDK ships as a single IIFE at ",[85,86,87],"code",{},"https:\u002F\u002Flitepush.dev\u002Fsdk.js",". No build step on your side.",[90,91,93],"h2",{"id":92},"script-tag","Script tag",[95,96,101],"pre",{"className":97,"code":98,"language":99,"meta":100,"style":100},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript\n  src=\"https:\u002F\u002Flitepush.dev\u002Fsdk.js\"\n  data-project=\"prj_xxxxxxxx\"\n  data-vapid-key=\"xxxxxxxx\"\n  async\n>\u003C\u002Fscript>\n","html","",[85,102,103,115,133,147,161,166],{"__ignoreMap":100},[104,105,107,111],"span",{"class":106,"line":7},"line",[104,108,110],{"class":109},"sMK4o","\u003C",[104,112,114],{"class":113},"swJcz","script\n",[104,116,117,121,124,127,130],{"class":106,"line":22},[104,118,120],{"class":119},"spNyl","  src",[104,122,123],{"class":109},"=",[104,125,126],{"class":109},"\"",[104,128,87],{"class":129},"sfazB",[104,131,132],{"class":109},"\"\n",[104,134,135,138,140,142,145],{"class":106,"line":32},[104,136,137],{"class":119},"  data-project",[104,139,123],{"class":109},[104,141,126],{"class":109},[104,143,144],{"class":129},"prj_xxxxxxxx",[104,146,132],{"class":109},[104,148,149,152,154,156,159],{"class":106,"line":39},[104,150,151],{"class":119},"  data-vapid-key",[104,153,123],{"class":109},[104,155,126],{"class":109},[104,157,158],{"class":129},"xxxxxxxx",[104,160,132],{"class":109},[104,162,163],{"class":106,"line":46},[104,164,165],{"class":119},"  async\n",[104,167,168,171,174],{"class":106,"line":53},[104,169,170],{"class":109},">\u003C\u002F",[104,172,173],{"class":113},"script",[104,175,176],{"class":109},">\n",[178,179,180,196],"table",{},[181,182,183],"thead",{},[184,185,186,190,193],"tr",{},[187,188,189],"th",{},"Attribute",[187,191,192],{},"Required",[187,194,195],{},"Description",[197,198,199,213,225],"tbody",{},[184,200,201,207,210],{},[202,203,204],"td",{},[85,205,206],{},"data-project",[202,208,209],{},"yes",[202,211,212],{},"Your project ID from the dashboard.",[184,214,215,220,222],{},[202,216,217],{},[85,218,219],{},"data-vapid-key",[202,221,209],{},[202,223,224],{},"The project's VAPID public key. If you rotate VAPID keys from the dashboard, update this attribute — existing subscribers stop receiving pushes until they re-opt in with the new key.",[184,226,227,232,235],{},[202,228,229],{},[85,230,231],{},"async",[202,233,234],{},"recommended",[202,236,237],{},"Lets the script load without blocking page render.",[90,239,241],{"id":240},"methods","Methods",[81,243,244,245,248,249,253,254,257],{},"The SDK exposes ",[85,246,247],{},"window.litepush"," once it's loaded. Calls made ",[250,251,252],"strong",{},"before"," load go onto ",[85,255,256],{},"window.litepushQ"," as functions and run when the SDK initialises.",[259,260,262],"h3",{"id":261},"litepushsubscribeoptions",[85,263,264],{},"litepush.subscribe(options?)",[81,266,267,268,271],{},"Prompts the user for notification permission (if not already granted), registers the service worker, creates a ",[85,269,270],{},"PushSubscription",", and registers it with LitePush.",[95,273,277],{"className":274,"code":275,"language":276,"meta":100,"style":100},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const result = await litepush.subscribe({\n  userId: \"user_42\",   \u002F\u002F optional — your own user id, stored as external_id\n});\n","js",[85,278,279,310,333],{"__ignoreMap":100},[104,280,281,284,288,290,294,297,300,304,307],{"class":106,"line":7},[104,282,283],{"class":119},"const",[104,285,287],{"class":286},"sTEyZ"," result ",[104,289,123],{"class":109},[104,291,293],{"class":292},"s7zQu"," await",[104,295,296],{"class":286}," litepush",[104,298,299],{"class":109},".",[104,301,303],{"class":302},"s2Zo4","subscribe",[104,305,306],{"class":286},"(",[104,308,309],{"class":109},"{\n",[104,311,312,315,318,321,324,326,329],{"class":106,"line":22},[104,313,314],{"class":113},"  userId",[104,316,317],{"class":109},":",[104,319,320],{"class":109}," \"",[104,322,323],{"class":129},"user_42",[104,325,126],{"class":109},[104,327,328],{"class":109},",",[104,330,332],{"class":331},"sHwdD","   \u002F\u002F optional — your own user id, stored as external_id\n",[104,334,335,338,341],{"class":106,"line":32},[104,336,337],{"class":109},"}",[104,339,340],{"class":286},")",[104,342,343],{"class":109},";\n",[81,345,346],{},"Returns:",[95,348,352],{"className":349,"code":350,"language":351,"meta":100,"style":100},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","type SubscribeResult =\n  | { id: string }   \u002F\u002F LitePush subscriber id\n  | null;            \u002F\u002F user denied permission\n","ts",[85,353,354,366,388],{"__ignoreMap":100},[104,355,356,359,363],{"class":106,"line":7},[104,357,358],{"class":119},"type",[104,360,362],{"class":361},"sBMFI"," SubscribeResult",[104,364,365],{"class":109}," =\n",[104,367,368,371,374,377,379,382,385],{"class":106,"line":22},[104,369,370],{"class":109},"  |",[104,372,373],{"class":109}," {",[104,375,376],{"class":113}," id",[104,378,317],{"class":109},[104,380,381],{"class":361}," string",[104,383,384],{"class":109}," }",[104,386,387],{"class":331},"   \u002F\u002F LitePush subscriber id\n",[104,389,390,392,395,398],{"class":106,"line":32},[104,391,370],{"class":109},[104,393,394],{"class":361}," null",[104,396,397],{"class":109},";",[104,399,400],{"class":331},"            \u002F\u002F user denied permission\n",[81,402,403,404,407,408,411,412,415],{},"Throws if the browser doesn't support web push (use ",[85,405,406],{},"canSubscribe()"," to check first) or if the page's ",[85,409,410],{},"\u003Cscript>"," tag is missing required ",[85,413,414],{},"data-*"," attributes.",[81,417,418,421],{},[250,419,420],{},"Must be called from a user gesture"," (click, tap, key press). Browsers reject silent permission prompts.",[423,424,425],"blockquote",{},[81,426,427,428,431,432,434,435,438,439,299],{},"The SDK's ",[85,429,430],{},"subscribe()"," does not take group IDs by design — group membership is managed server-side. Once ",[85,433,430],{}," returns the subscriber's ID, call ",[85,436,437],{},"POST \u002Fv1\u002Fgroups\u002F:id\u002Fsubscribers"," from your server to assign the user's groups. This keeps membership tamper-proof from the client. See ",[440,441,442],"a",{"href":60},[85,443,59],{},[259,445,447],{"id":446},"litepushunsubscribe",[85,448,449],{},"litepush.unsubscribe()",[81,451,452,453,455,456,459],{},"Cancels the subscription on the browser AND beacons our ",[85,454,37],{}," so the dashboard updates immediately rather than waiting for the next broadcast to discover the dead endpoint. Returns ",[85,457,458],{},"true"," if a subscription was actually removed.",[95,461,463],{"className":274,"code":462,"language":276,"meta":100,"style":100},"await litepush.unsubscribe();\n",[85,464,465],{"__ignoreMap":100},[104,466,467,470,472,474,477,480],{"class":106,"line":7},[104,468,469],{"class":292},"await",[104,471,296],{"class":286},[104,473,299],{"class":109},[104,475,476],{"class":302},"unsubscribe",[104,478,479],{"class":286},"()",[104,481,343],{"class":109},[259,483,485],{"id":484},"litepushissubscribed",[85,486,487],{},"litepush.isSubscribed()",[81,489,490,491,493],{},"Returns ",[85,492,458],{}," if the browser currently has an active subscription for your project. Asynchronous because it has to look up the service worker registration.",[95,495,497],{"className":274,"code":496,"language":276,"meta":100,"style":100},"if (await litepush.isSubscribed()) {\n  document.getElementById(\"subscribe-btn\").style.display = \"none\";\n}\n",[85,498,499,521,564],{"__ignoreMap":100},[104,500,501,504,507,509,511,513,516,519],{"class":106,"line":7},[104,502,503],{"class":292},"if",[104,505,506],{"class":286}," (",[104,508,469],{"class":292},[104,510,296],{"class":286},[104,512,299],{"class":109},[104,514,515],{"class":302},"isSubscribed",[104,517,518],{"class":286},"()) ",[104,520,309],{"class":109},[104,522,523,526,528,531,533,535,538,540,542,544,547,549,552,555,557,560,562],{"class":106,"line":22},[104,524,525],{"class":286},"  document",[104,527,299],{"class":109},[104,529,530],{"class":302},"getElementById",[104,532,306],{"class":113},[104,534,126],{"class":109},[104,536,537],{"class":129},"subscribe-btn",[104,539,126],{"class":109},[104,541,340],{"class":113},[104,543,299],{"class":109},[104,545,546],{"class":286},"style",[104,548,299],{"class":109},[104,550,551],{"class":286},"display",[104,553,554],{"class":109}," =",[104,556,320],{"class":109},[104,558,559],{"class":129},"none",[104,561,126],{"class":109},[104,563,343],{"class":109},[104,565,566],{"class":106,"line":32},[104,567,568],{"class":109},"}\n",[259,570,572],{"id":571},"litepushcansubscribe",[85,573,574],{},"litepush.canSubscribe()",[81,576,577,578,580],{},"Synchronous capability check — returns ",[85,579,458],{}," on browsers that support web push. Safe to call from any context (no permission prompt, no async work). Use it to hide the subscribe button on browsers that won't deliver pushes anyway.",[95,582,584],{"className":274,"code":583,"language":276,"meta":100,"style":100},"if (!litepush.canSubscribe()) {\n  document.getElementById(\"subscribe-btn\").remove();\n}\n",[85,585,586,607,634],{"__ignoreMap":100},[104,587,588,590,592,595,598,600,603,605],{"class":106,"line":7},[104,589,503],{"class":292},[104,591,506],{"class":286},[104,593,594],{"class":109},"!",[104,596,597],{"class":286},"litepush",[104,599,299],{"class":109},[104,601,602],{"class":302},"canSubscribe",[104,604,518],{"class":286},[104,606,309],{"class":109},[104,608,609,611,613,615,617,619,621,623,625,627,630,632],{"class":106,"line":22},[104,610,525],{"class":286},[104,612,299],{"class":109},[104,614,530],{"class":302},[104,616,306],{"class":113},[104,618,126],{"class":109},[104,620,537],{"class":129},[104,622,126],{"class":109},[104,624,340],{"class":113},[104,626,299],{"class":109},[104,628,629],{"class":302},"remove",[104,631,479],{"class":113},[104,633,343],{"class":109},[104,635,636],{"class":106,"line":32},[104,637,568],{"class":109},[259,639,641],{"id":640},"litepushversion",[85,642,643],{},"litepush.version",[81,645,646],{},"Read-only string. Useful when filing support tickets.",[90,648,650],{"id":649},"the-deferred-call-queue","The deferred-call queue",[81,652,653,654,657,658,661,662,664],{},"If you call into the SDK before ",[85,655,656],{},"sdk.js"," has loaded, push a ",[250,659,660],{},"function"," onto ",[85,663,256],{},". The SDK replays the queue in order once it boots:",[95,666,668],{"className":97,"code":667,"language":99,"meta":100,"style":100},"\u003Cbutton id=\"subscribe-btn\">Enable notifications\u003C\u002Fbutton>\n\n\u003Cscript>\n  \u002F\u002F Safe — runs before sdk.js loads. Queued and replayed.\n  document.getElementById(\"subscribe-btn\").addEventListener(\"click\", () => {\n    (window.litepushQ = window.litepushQ || []).push((lp) => {\n      lp.subscribe({ userId: currentUser.id });\n    });\n  });\n\u003C\u002Fscript>\n\n\u003Cscript src=\"https:\u002F\u002Flitepush.dev\u002Fsdk.js\" data-project=\"...\" data-vapid-key=\"...\" async>\u003C\u002Fscript>\n",[85,669,670,700,706,714,719,762,809,842,851,860,868,873],{"__ignoreMap":100},[104,671,672,674,677,679,681,683,685,687,690,693,696,698],{"class":106,"line":7},[104,673,110],{"class":109},[104,675,676],{"class":113},"button",[104,678,376],{"class":119},[104,680,123],{"class":109},[104,682,126],{"class":109},[104,684,537],{"class":129},[104,686,126],{"class":109},[104,688,689],{"class":109},">",[104,691,692],{"class":286},"Enable notifications",[104,694,695],{"class":109},"\u003C\u002F",[104,697,676],{"class":113},[104,699,176],{"class":109},[104,701,702],{"class":106,"line":22},[104,703,705],{"emptyLinePlaceholder":704},true,"\n",[104,707,708,710,712],{"class":106,"line":32},[104,709,110],{"class":109},[104,711,173],{"class":113},[104,713,176],{"class":109},[104,715,716],{"class":106,"line":39},[104,717,718],{"class":331},"  \u002F\u002F Safe — runs before sdk.js loads. Queued and replayed.\n",[104,720,721,723,725,727,729,731,733,735,737,739,742,744,746,749,751,753,756,759],{"class":106,"line":46},[104,722,525],{"class":286},[104,724,299],{"class":109},[104,726,530],{"class":302},[104,728,306],{"class":286},[104,730,126],{"class":109},[104,732,537],{"class":129},[104,734,126],{"class":109},[104,736,340],{"class":286},[104,738,299],{"class":109},[104,740,741],{"class":302},"addEventListener",[104,743,306],{"class":286},[104,745,126],{"class":109},[104,747,748],{"class":129},"click",[104,750,126],{"class":109},[104,752,328],{"class":109},[104,754,755],{"class":109}," ()",[104,757,758],{"class":119}," =>",[104,760,761],{"class":109}," {\n",[104,763,764,767,770,772,775,777,780,782,784,787,790,792,795,797,799,803,805,807],{"class":106,"line":53},[104,765,766],{"class":113},"    (",[104,768,769],{"class":286},"window",[104,771,299],{"class":109},[104,773,774],{"class":286},"litepushQ",[104,776,554],{"class":109},[104,778,779],{"class":286}," window",[104,781,299],{"class":109},[104,783,774],{"class":286},[104,785,786],{"class":109}," ||",[104,788,789],{"class":113}," [])",[104,791,299],{"class":109},[104,793,794],{"class":302},"push",[104,796,306],{"class":113},[104,798,306],{"class":109},[104,800,802],{"class":801},"sHdIc","lp",[104,804,340],{"class":109},[104,806,758],{"class":119},[104,808,761],{"class":109},[104,810,811,814,816,818,820,823,826,828,831,833,836,838,840],{"class":106,"line":57},[104,812,813],{"class":286},"      lp",[104,815,299],{"class":109},[104,817,303],{"class":302},[104,819,306],{"class":113},[104,821,822],{"class":109},"{",[104,824,825],{"class":113}," userId",[104,827,317],{"class":109},[104,829,830],{"class":286}," currentUser",[104,832,299],{"class":109},[104,834,835],{"class":286},"id",[104,837,384],{"class":109},[104,839,340],{"class":113},[104,841,343],{"class":109},[104,843,844,847,849],{"class":106,"line":61},[104,845,846],{"class":109},"    }",[104,848,340],{"class":113},[104,850,343],{"class":109},[104,852,853,856,858],{"class":106,"line":65},[104,854,855],{"class":109},"  }",[104,857,340],{"class":286},[104,859,343],{"class":109},[104,861,862,864,866],{"class":106,"line":69},[104,863,695],{"class":109},[104,865,173],{"class":113},[104,867,176],{"class":109},[104,869,871],{"class":106,"line":870},11,[104,872,705],{"emptyLinePlaceholder":704},[104,874,876,878,880,883,885,887,889,891,894,896,898,901,903,906,908,910,912,914,917,919,921],{"class":106,"line":875},12,[104,877,110],{"class":109},[104,879,173],{"class":113},[104,881,882],{"class":119}," src",[104,884,123],{"class":109},[104,886,126],{"class":109},[104,888,87],{"class":129},[104,890,126],{"class":109},[104,892,893],{"class":119}," data-project",[104,895,123],{"class":109},[104,897,126],{"class":109},[104,899,900],{"class":129},"...",[104,902,126],{"class":109},[104,904,905],{"class":119}," data-vapid-key",[104,907,123],{"class":109},[104,909,126],{"class":109},[104,911,900],{"class":129},[104,913,126],{"class":109},[104,915,916],{"class":119}," async",[104,918,170],{"class":109},[104,920,173],{"class":113},[104,922,176],{"class":109},[81,924,925],{},"The callback receives the SDK object — call any method on it.",[90,927,929],{"id":928},"browser-support","Browser support",[931,932,933,937,940,947],"ul",{},[934,935,936],"li",{},"Chrome \u002F Edge desktop + mobile",[934,938,939],{},"Firefox desktop + Android",[934,941,942,943,946],{},"Safari ",[250,944,945],{},"macOS 16+"," — any site, no install required",[934,948,942,949,952,953,956,957,959],{},[250,950,951],{},"iOS \u002F iPadOS 16.4+"," — ",[250,954,955],{},"only when your site is installed to the Home Screen as a PWA."," Web Push does not deliver in a regular Safari tab on iOS; the APIs exist but ",[85,958,430],{}," will fail.",[81,961,962,964,965,968],{},[85,963,406],{}," accounts for the iOS PWA-install requirement automatically — it returns ",[85,966,967],{},"false"," for an iOS visitor who hasn't added your site to their Home Screen yet, even though the underlying Push APIs are present. To give those visitors a path to subscribing, detect the same condition yourself and surface an \"Add to Home Screen\" prompt:",[95,970,972],{"className":274,"code":971,"language":276,"meta":100,"style":100},"const isIOSorIPadOS =\n  \u002FiPad|iPhone|iPod\u002F.test(navigator.userAgent) ||\n  (navigator.platform === \"MacIntel\" && navigator.maxTouchPoints > 1);\nconst isStandalone =\n  navigator.standalone === true ||\n  window.matchMedia(\"(display-mode: standalone)\").matches;\n\nif (!litepush.canSubscribe()) {\n  if (isIOSorIPadOS && !isStandalone) {\n    showAddToHomeScreenHint();\n  } else {\n    hideSubscribeButton();\n  }\n}\n",[85,973,974,984,1022,1063,1072,1091,1119,1123,1141,1164,1173,1182,1191,1197],{"__ignoreMap":100},[104,975,976,978,981],{"class":106,"line":7},[104,977,283],{"class":119},[104,979,980],{"class":286}," isIOSorIPadOS ",[104,982,983],{"class":109},"=\n",[104,985,986,989,992,995,998,1000,1003,1006,1008,1011,1014,1016,1019],{"class":106,"line":22},[104,987,988],{"class":109},"  \u002F",[104,990,991],{"class":129},"iPad",[104,993,994],{"class":109},"|",[104,996,997],{"class":129},"iPhone",[104,999,994],{"class":109},[104,1001,1002],{"class":129},"iPod",[104,1004,1005],{"class":109},"\u002F",[104,1007,299],{"class":109},[104,1009,1010],{"class":302},"test",[104,1012,1013],{"class":286},"(navigator",[104,1015,299],{"class":109},[104,1017,1018],{"class":286},"userAgent) ",[104,1020,1021],{"class":109},"||\n",[104,1023,1024,1027,1029,1032,1035,1037,1040,1042,1045,1048,1050,1053,1055,1059,1061],{"class":106,"line":32},[104,1025,1026],{"class":286},"  (navigator",[104,1028,299],{"class":109},[104,1030,1031],{"class":286},"platform ",[104,1033,1034],{"class":109},"===",[104,1036,320],{"class":109},[104,1038,1039],{"class":129},"MacIntel",[104,1041,126],{"class":109},[104,1043,1044],{"class":109}," &&",[104,1046,1047],{"class":286}," navigator",[104,1049,299],{"class":109},[104,1051,1052],{"class":286},"maxTouchPoints ",[104,1054,689],{"class":109},[104,1056,1058],{"class":1057},"sbssI"," 1",[104,1060,340],{"class":286},[104,1062,343],{"class":109},[104,1064,1065,1067,1070],{"class":106,"line":39},[104,1066,283],{"class":119},[104,1068,1069],{"class":286}," isStandalone ",[104,1071,983],{"class":109},[104,1073,1074,1077,1079,1082,1084,1088],{"class":106,"line":46},[104,1075,1076],{"class":286},"  navigator",[104,1078,299],{"class":109},[104,1080,1081],{"class":286},"standalone ",[104,1083,1034],{"class":109},[104,1085,1087],{"class":1086},"sfNiH"," true",[104,1089,1090],{"class":109}," ||\n",[104,1092,1093,1096,1098,1101,1103,1105,1108,1110,1112,1114,1117],{"class":106,"line":53},[104,1094,1095],{"class":286},"  window",[104,1097,299],{"class":109},[104,1099,1100],{"class":302},"matchMedia",[104,1102,306],{"class":286},[104,1104,126],{"class":109},[104,1106,1107],{"class":129},"(display-mode: standalone)",[104,1109,126],{"class":109},[104,1111,340],{"class":286},[104,1113,299],{"class":109},[104,1115,1116],{"class":286},"matches",[104,1118,343],{"class":109},[104,1120,1121],{"class":106,"line":57},[104,1122,705],{"emptyLinePlaceholder":704},[104,1124,1125,1127,1129,1131,1133,1135,1137,1139],{"class":106,"line":61},[104,1126,503],{"class":292},[104,1128,506],{"class":286},[104,1130,594],{"class":109},[104,1132,597],{"class":286},[104,1134,299],{"class":109},[104,1136,602],{"class":302},[104,1138,518],{"class":286},[104,1140,309],{"class":109},[104,1142,1143,1146,1148,1151,1153,1156,1159,1162],{"class":106,"line":65},[104,1144,1145],{"class":292},"  if",[104,1147,506],{"class":113},[104,1149,1150],{"class":286},"isIOSorIPadOS",[104,1152,1044],{"class":109},[104,1154,1155],{"class":109}," !",[104,1157,1158],{"class":286},"isStandalone",[104,1160,1161],{"class":113},") ",[104,1163,309],{"class":109},[104,1165,1166,1169,1171],{"class":106,"line":69},[104,1167,1168],{"class":302},"    showAddToHomeScreenHint",[104,1170,479],{"class":113},[104,1172,343],{"class":109},[104,1174,1175,1177,1180],{"class":106,"line":870},[104,1176,855],{"class":109},[104,1178,1179],{"class":292}," else",[104,1181,761],{"class":109},[104,1183,1184,1187,1189],{"class":106,"line":875},[104,1185,1186],{"class":302},"    hideSubscribeButton",[104,1188,479],{"class":113},[104,1190,343],{"class":109},[104,1192,1194],{"class":106,"line":1193},13,[104,1195,1196],{"class":109},"  }\n",[104,1198,1200],{"class":106,"line":1199},14,[104,1201,568],{"class":109},[81,1203,1204,1206,1207,1209],{},[85,1205,430],{}," throws on any browser where ",[85,1208,406],{}," is false, so always gate the button on the capability check first.",[546,1211,1212],{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":100,"searchDepth":22,"depth":22,"links":1214},[1215,1216,1223,1224],{"id":92,"depth":22,"text":93},{"id":240,"depth":22,"text":241,"children":1217},[1218,1219,1220,1221,1222],{"id":261,"depth":32,"text":264},{"id":446,"depth":32,"text":449},{"id":484,"depth":32,"text":487},{"id":571,"depth":32,"text":574},{"id":640,"depth":32,"text":643},{"id":649,"depth":22,"text":650},{"id":928,"depth":22,"text":929},"The litepush.js script tag, methods exposed on window.litepush, and the deferred-call queue pattern.","md",false,{},{"title":15,"description":1225},"docs\u002Fsdk\u002Fusage","Q66ZG_nsb0CRWUMtRVS_KfIgy2bCPRQb30L_ungy2NY",1780560203629]