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?

html cordova

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

Commonly Used HTML Tags with Examples

HTML tags are keywords used in HTML to display web-pages with certain properties. They are further used for defining HTML elements. An HTML element consists of a starting tag.

HTML Basics to Learn HTML for Web Development

HTML is the mark-up language most websites are written in. In this article, we will delve into the most basics of HTML like tags and elements that are of utmost importance while writing any code in HTML. These tags help in the structuring and display of content on the web pages.

Types, Effects and Attributes

Learn about HTML Button & various effects on these buttons like ripple, fade-in & pressed. Learn types of HTML buttons - shaded button, animated button etc.

HTML Checkbox - How to Create Custom Check Box in HTML

Learn about HTML Checkbox - Various types of checkbox and their attributes, How to define multiple checkboxes, use CSS and javascript for checkboxes in HTML.