how to judge CORDOVA environment in it's html script?

how to judge CORDOVA environment in it's html script?

I am making a composite-website supporting both web-browser & cordova-app. I want to add "cordova.js" script-element dynamic by javascript in *.html page. but how can I know I am in cordova-app environment?

I am making a composite-website supporting both web-browser & cordova-app. I want to add "cordova.js" script-element dynamic by javascript in *.html page. but how can I know I am in cordova-app environment?

(background: making a composite-website supporting both web-browser & cordova-app.)

I make cordova "config.xml" as follow:

<widget ...>
    ...
    <content src="http://192.168.0.102:3000/index.html" /><!--my website-->
    ...
</widget>

And in my website page "index.html" I write:

<script>
$(function(){
    if (???? CONDITION ????) {
        var scriptcordova = document.createElement('script');
        scriptcordova.async = false;
        scriptcordova.src = 'cordova.js';
        document.head.appendChild(scriptcordova);
    }
});
</script>

Page without condition is running well in cordova. But WHAT CONDITION to use?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Understanding of Meter Tag in HTML 5

This post explains the HTML 5 meter tag and how to create it

The Ultimate Guide to Web Development with HTML and CSS

The Ultimate Guide to Web Development with HTML and CSS. Learn Web Development by creating a Blog with HTML and CSS. Make a web applications using HTML5 and CSS3. Create a blog from Scratch.

Render HTML with Vanilla JavaScript and lit-html

Sometimes you need to render HTML elements on a web page. And like Goldilocks' search for "just right", you have to try a few techniques before you find the right one. Using a framework may be too hard. Using pure HTML and the DOM API may be too soft. What you need is something in the middle that is just right. Is lit-html "just right"? Let's find out.