addPublicLocalApplicationUri method

Specifies local context Uniform Resource Identifiers (URIs) for the zone elevation that is allowed.

Internet Explorer 10

 

Syntax

MSApp.addPublicLocalApplicationUri(uri);

Parameters

  • uri [in]
    Type: String

    String that identifies a wildcard URI that describes destination local context URIs for the zone elevation that is allowed for this object.

Return value

This method does not return a value.

Remarks

The addPublicLocalApplicationUri method provides a means to explicitly allow zone elevation from the web context to specific URIs in the local context. The addPublicLocalApplicationUri method lets the web context URI navigate to any local context URI that is specified in a call to addPublicLocalApplicationUri.

If this method is called in the web context, it throws an access-denied JavaScript exception.

The addPublicLocalApplicationUri method exposes the provided local context URIs to arbitrary untrusted web content. You must ensure that these local context documents treat all input on their URI query or fragment property as untrusted because it can be set by arbitrary untrusted web content.

Additionally, this method lets you opt-out of a Windows app using JavaScript security feature. Accordingly, you must only use addPublicLocalApplicationUri if necessary.

The wildcardUri is interpreted as relative to the root of the current package, so you do not need to specify the scheme or hostname.

A wildcard URIs that is equivalent to the root of a package is not allowed, and an access denied exception is thrown.

See also

MSApp