File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
- var JSONEditor = function ( ) {
3
+ var JSONEditor = function ( container ) {
4
4
var _scope = { } ;
5
5
6
6
var EDITOR_ID = "json_editor" ;
@@ -17,19 +17,20 @@ var JSONEditor = function() {
17
17
( function constructor ( ) {
18
18
_jsonFormContainer = document . createElement ( "div" ) ;
19
19
_jsonFormContainer . id = EDITOR_ID ;
20
+
21
+ container . appendChild ( _jsonFormContainer ) ;
20
22
} ) ( ) ;
21
23
22
24
_scope . setTitle = function ( title ) {
23
25
_title = title ;
24
26
trySetTitle ( ) ;
25
27
}
26
28
27
- _scope . setJSON = function ( container , value ) {
29
+ _scope . setJSON = function ( value ) {
28
30
_json = value ;
29
31
30
32
_jsonFormContainer . innerHTML = "" ;
31
- container . appendChild ( _jsonFormContainer ) ;
32
-
33
+
33
34
_tabIndex = - 1 ;
34
35
35
36
parse ( _jsonFormContainer , ROOT_NAME , _json ) ;
You can’t perform that action at this time.
0 commit comments