Skip to content

Runing into NWjs fails by npm but works by CDN #782

@DanielBanobreDopico

Description

@DanielBanobreDopico

General information

  • json-editor version: 2.3.0

Expected behavior

Calling new JSONEditor(documentSection,{schema: schema}) must build a form.

Actual behavior

Raise Error: element should be an instance of Element
=====> BUT if I use CDN instead npm, It works. <=====

Steps to reproduce the behavior

npm install @json-editor/json-editor --save

const JSONEditor = require('@json-editor/json-editor').JSONEditor;
const documentSection = document.getElementById('documentSection');
const schena = '{"type":"object","required":["x","y"],"properties":{"x":{"type":"number"},"y":{"type":"number"}}}';
new JSONEditor(documentSection,{schema: schema})

Notes:

documentSection instanceof Element returns true
=====>>> It's running in NWjs <<<======

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions