Skip to content

Commit e52acd1

Browse files
authored
Minor changes
1 parent e99f6cc commit e52acd1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

json-editor.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
var JSONEditor = function() {
3+
var JSONEditor = function(container) {
44
var _scope = {};
55

66
var EDITOR_ID = "json_editor";
@@ -17,19 +17,20 @@ var JSONEditor = function() {
1717
(function constructor() {
1818
_jsonFormContainer = document.createElement("div");
1919
_jsonFormContainer.id = EDITOR_ID;
20+
21+
container.appendChild(_jsonFormContainer);
2022
})();
2123

2224
_scope.setTitle = function(title) {
2325
_title = title;
2426
trySetTitle();
2527
}
2628

27-
_scope.setJSON = function(container, value) {
29+
_scope.setJSON = function(value) {
2830
_json = value;
2931

3032
_jsonFormContainer.innerHTML = "";
31-
container.appendChild(_jsonFormContainer);
32-
33+
3334
_tabIndex = -1;
3435

3536
parse(_jsonFormContainer, ROOT_NAME, _json);

0 commit comments

Comments
 (0)