Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Commit 3f3de5b

Browse files
committed
updated
1 parent 306e9bf commit 3f3de5b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
constructor() {
1010
// establish prototype chain
1111
super();
12-
this.ajv_url = 'https://unpkg.com/ajv@6.5.5/dist/ajv.min.js'
13-
this.json_editor_url = 'https://unpkg.com/jsoneditor@5.25.0';
12+
this.default_ajv_url = 'https://unpkg.com/ajv@6.5.5/dist/ajv.min.js'
13+
this.default_json_editor_url = 'https://unpkg.com/jsoneditor@5.25.0';
1414
this.promises = {};
1515
}
1616

1717
static get observedAttributes() {
18-
return ['jsoneditor', 'metaschema', 'schema'];
18+
return ['ajv', 'jsoneditor', 'metaschema', 'schema'];
1919
}
2020

2121
// fires after the element has been attached to the DOM
@@ -112,7 +112,8 @@
112112
}
113113

114114
update() {
115-
//this.ajvurl = this.getAttribute('ajv') || this.ajvurl
115+
this.ajv_url = this.getAttribute('ajv') || this.default_ajv_url
116+
this.json_editor_url = this.getAttribute('jsoneditor') || this.default_json_editor_url
116117
this.schemaurl = this.getAttribute('schema')
117118
this.metaschemaurl = this.getAttribute('metaschema')
118119
this.updated = Promise.all([

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code.gov/json-schema-validator-web-component",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Simple Web Component that Validates a JSON File",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)