Skip to content

What is a Document? And question about isolating parts of a large number of scripts. #600

Discussion options

You must be logged in to vote

Hi @the-byte-bender,

I didn't find much documentation around what Document objects are. When to use them and why?

A Document instance represents a script, module, or other file retrieved from a specific location. It's the principal data type returned from a document loader, so if you're implementing a custom document loader, you'll be dealing directly with these objects. ClearScript provides a default document loader that retrieves documents from the file system and the web, and most hosts just use that.

It would be great to add some shared host types and objects between all engines

If you're asking whether you can expose a specific host object or type in multiple script engines, then…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ClearScriptLib
Comment options

@the-byte-bender
Comment options

@ClearScriptLib
Comment options

@the-byte-bender
Comment options

@ClearScriptLib
Comment options

Answer selected by the-byte-bender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants