Open hsolbrig opened 7 years ago
USVString handles both URI and text; WebIDL has not datatype for URI, and this is not commonly used in other specs I've seen. The distinction between text and URI is described in the processing steps.
We could break with other use and define a URI
datatype, which is based on USVString
, but that doesn't help an actual implementation as the API is invoked with a string, which still must be disambiguated.
I prefer it the be actually typed in the options, were it should be explicitly stated that is should interpret it as an URI. This is because I see potential security issues in the future if people our going to include these validation api and associated validation implementation into their productions codes. Users might miss the notion that the validator can interpret their data as an URI.
I'm not against this, but I don't see what may actually happen. Anything that has the form of a URI couldn't possibly be either a schema or a graph and visa-versa. If it is a URI, then dereferencing it would be an issue in either case. Probably should say "the form of an absolute URL".
Would like a third option for Schema -- a URI that references the actual schema:
''' Promise validate((USVString or URI or RDFGraph) schema, '''