W3C home > Mailing lists > Public > www-tag@w3.org > January 2011

Re: Javascript fragid semantics

From: Tim Berners-Lee <timbl@w3.org>
Date: Sun, 30 Jan 2011 11:40:25 -0500
Cc: Jonathan Rees <jar@creativecommons.org>, www-tag@w3.org, Ben Adida <ben@adida.net>
Message-Id: <39A0C08C-2526-4293-BC77-E632AB166082@w3.org>
To: nathan@webr3.org
Found this old message unfinished and unsent .. I send it unfinished

On 2010-12 -02, at 12:50, Nathan wrote:

> [...]

> Previously I'd just been thinking
> core.js:
>  FastGraph = function FastGraph(a) {
>  ...
> and #FastGraph being used to refer to that class as it's defined in the global scope of the js file.

Yes. exactly.
So now, we can use the full URI, 

How would we use it?

Yes, we could say 

	fg = webImport('http://example.com/code/libs/core.js#FastGraph')

where webImport would
	- return the function immediately if it is cached already
	- check whether the path involved matched your trust criteria
	- get the file http://example.com/code/libs/core.js
	- load it into javascript
	- check maybe for other modules which it needs
	- find the function FastGraph within it
	- return that

and later ask you whether you would like to install the package
and its dependencies for faster use and offline use.

of course, my choice for the metadata of dependencies would be RDF.
RDF graphs of dependencies are quite fun, I have generated them from the debian
packaging system (apt-get etc) with

Received on Sunday, 30 January 2011 16:40:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:36 UTC