tauri 2.10.3

Make tiny, secure apps for all desktop platforms with Tauri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

if (location.href !== __TEMPLATE_isolation_src__) {
  window.addEventListener('DOMContentLoaded', () => {
    let style = document.createElement('style')
    style.textContent = __TEMPLATE_style__
    document.head.append(style)

    let iframe = document.createElement('iframe')
    iframe.id = '__tauri_isolation__'
    iframe.sandbox.add('allow-scripts')
    iframe.src = __TEMPLATE_isolation_src__
    document.body.append(iframe)
  })
}