Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: widget.openURL("file://....")



Is the <img> tag url prefixing a bug or is it the intended behavior? Seems like a security violation actually since otherwise the widget has no knowledge of the file system (at that point my Info.plist had no AllowFileAccessOutsideOfWidget flag). I need to know what cases my widget should handle when it pulls the "src" property from <img> tags.

More questions about images:

Does anyone know a way of creating an <img> tag through "var newImg = new Image();" then placing that object into the Document? Something like document.addChildNode() or document.appendChild() perhaps...

Is there ANY known way of fabricating a widget-displayable image object (without using files on disk), including the image data and JavaScript object attributes needed by the WebKit framework? It could be supplied by a plugin, an applet, a widget.system() process, or even plain JavaScript code...?

Brian


> (1) creating an image object with myImage = new Image();
> myImage.src="files/image.jpg";
> results in the same value for "myImage.src" if you retrieve it after
> the image has been loaded
> However,...
> If you load the same image through the document with
> myImage = document.getElementById("imgTag4"); myImage.src =
> "files/image.jpg";
> then when you retrieve the value "myImage.src" after the image is
> loaded, it has been
> appended with the prefix "file://..." including the full pathname to
> the file.
>
> (2) calling widget.system("/bin/ls") without the second (endHandler)
> parameter will crash
> the entire widget (3 times in a row until the widget launcher gives
> up)
>


This should be fixed in 10.4.3 or later.

Thanks,
jl


_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: widget.openURL("file://....") (From: John Louch <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.