~ubuntu-branches/ubuntu/vivid/cordova-ubuntu-tests/vivid

« back to all changes in this revision

Viewing changes to www/cordova-plugin-whitelist/docs/whitelist.md

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-09-07 02:04:20 UTC
  • Revision ID: package-import@ubuntu.com-20130907020420-dejay9xcdmmwh0bd
Tags: upstream-2.11+13.10.20130907
ImportĀ upstreamĀ versionĀ 2.11+13.10.20130907

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
---
 
2
 license: Licensed to the Apache Software Foundation (ASF) under one
 
3
         or more contributor license agreements.  See the NOTICE file
 
4
         distributed with this work for additional information
 
5
         regarding copyright ownership.  The ASF licenses this file
 
6
         to you under the Apache License, Version 2.0 (the
 
7
         "License"); you may not use this file except in compliance
 
8
         with the License.  You may obtain a copy of the License at
 
9
 
 
10
           http://www.apache.org/licenses/LICENSE-2.0
 
11
 
 
12
         Unless required by applicable law or agreed to in writing,
 
13
         software distributed under the License is distributed on an
 
14
         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
15
         KIND, either express or implied.  See the License for the
 
16
         specific language governing permissions and limitations
 
17
         under the License.
 
18
---
 
19
 
 
20
Whitelist
 
21
=========
 
22
 
 
23
> The `whitelist` object provides an interface for testing whether arbitrary
 
24
> URLs are allowed by the currently active configuration, or would be allowed
 
25
> by a given set of whitelist patterns.
 
26
 
 
27
Methods
 
28
-------
 
29
 
 
30
- cordova.whitelist.match
 
31
- cordova.whitelist.test
 
32
 
 
33
### cordova.whitelist.match
 
34
 
 
35
Indicates whether a given URL would be allowed by a set of Whitelist URL
 
36
patterns.
 
37
 
 
38
    cordova.whitelist.match(url, patterns, callback);
 
39
 
 
40
`callback` will be invoked with a boolean argument indicating whether the
 
41
url matches the set of patterns.
 
42
 
 
43
### cordova.whitelist.test
 
44
 
 
45
Indicates whether a given URL would be allowed by the current application
 
46
configuration.
 
47
 
 
48
    cordova.whitelist.test(url, callback);
 
49
 
 
50
`callback` will be invoked with a boolean argument indicating whether the
 
51
url is currently whitelisted.