UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 429 B
import a from"../tools/base-runtime-url";import{loadImage as c}from"./loadImage";const n=`${a}expofp-overlay.png`;export async function detectLimitedModeViaImage(r=n){try{const o=await c(r),t=document.createElement("canvas");t.width=1,t.height=1;const e=t.getContext("2d");if(!e)return!0;try{return e.drawImage(o,0,0,1,1),e.getImageData(0,0,1,1),!1}catch{return!0}}catch{return typeof location<"u"&&location.protocol==="file:"}}