Ojan brought this up before, but I think it's a good idea, so I'll
evangelize it some more.  Instead of requiring the extension developer
to come up with an extension ID (com.google.myextension), use
templating to automatically substitute a guaranteed unique ID where
needed.  The template substitution would be done in the browser
process before we handed the script off to a renderer. Examples:
-  img.src = "${EXTENSION_URL}/foo.gif";
-  var extension = new chromium.Extension("${EXTENSION_ID}");

Advantages:
- We can guarantee that the ID will be unique.
- Extension developers don't need to know what scheme extension
resources are served from.  It could be "http" or "file" for all they
care.
- We can include some random hash in the extension ID, so malicious
content can't test for the presence of an extension.

Disadvantages:
- We'd have to worry about template substitution and deal with
escaping.


On Dec 10, 11:46 am, Aaron Boodman <[EMAIL PROTECTED]> wrote:
> I've added a design doc for how the user scripts feature of extensions
> will work:
>
> http://sites.google.com/a/chromium.org/dev/developers/design-document...
>
> This is the feature we were previously calling "content scripts".
> There is a section in the document labeled "alternative
> ideas/concerns" that described the rationale behind the name change.
>
> Let me know what you think,
>
> - a
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to