This repository was archived by the owner on Aug 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 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
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 ( [
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments