Initial commit

This commit is contained in:
github-classroom[bot] 2023-04-25 11:33:41 +00:00 committed by GitHub
commit e42e547e48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1287 changed files with 553558 additions and 0 deletions

129
.gitignore vendored Normal file
View File

@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# Information Modelling & Analysis: Project 2
Student: enter your name here
Please follow the instructions provided in the project slides
and consider the submission instructions available on iCorsi.
For your convencience, I the following resources are available in the `resources` folder:
- **defects4j-checkout-closure-1f**: The output of the command `defects4j checkout -p Closure -v 1f -w ...`
- **modified_classes** The list of buggy classes in: `framework/projects/Closure/modified_classes/`

0
evaluate_classifiers.py Normal file
View File

View File

0
label_feature_vectors.py Normal file
View File

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="build/test-classes" path="test"/>
<classpathentry including="**/*.java" kind="src" path="src"/>
<classpathentry including="**/*.java" kind="src" path="gen"/>
<classpathentry kind="lib" path="lib/ant.jar"/>
<classpathentry kind="lib" path="lib/ant-launcher.jar"/>
<classpathentry kind="lib" path="lib/args4j.jar"/>
<classpathentry kind="lib" path="lib/guava.jar"/>
<classpathentry kind="lib" path="lib/jarjar.jar"/>
<classpathentry kind="lib" path="lib/json.jar"/>
<classpathentry kind="lib" path="lib/jsr305.jar"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="lib/caja-r4314.jar"/>
<classpathentry kind="lib" path="lib/protobuf-java.jar"/>
<!--
You need to tell Eclipse to build the compiler jar first, and then
normal source warnings will work because it will pick up the artifact.
If anyone has any better ideas, I'd be glad to hear them.
-->
<classpathentry kind="lib" path="build/lib/rhino.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

View File

@ -0,0 +1,3 @@
#File automatically generated by Defects4J
pid=Closure
vid=1f

View File

@ -0,0 +1 @@
.svn

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>closure-compiler</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,61 @@
All contributors to Closure Compiler must sign a CLA.
What is a CLA?
----------------------------------------
A CLA (Contributor License Agreement) basically says that you own the
rights to any code you contribute, and that you give us permission to
use that code in Closure Compiler. You maintain the copyright on that
code.
Where do I sign up?
----------------------------------------
If you own all the rights to your code, you can fill out an individual CLA.
http://code.google.com/legal/individual-cla-v1.0.html
If your employer has any rights to your code, then they also need to fill
out a corporate CLA. If you don't know if your employer has any rights
to your code, you should ask before signing anything.
http://code.google.com/legal/corporate-cla-v1.0.html
CLA Signers
----------------------------------------
By default, anyone with an @google.com email address already has a CLA
signed for them. Congratulations!
We've also received CLAs from the following people:
amattie [gmail.com] (Andrew Mattie)
ambar.lee [gmail.com]
benjamin.j.mccann [gmail.com]
cpeisert [gmail.com] (Christopher Peisert)
chadkillingsworth [missouristate.edu] (Chad Killingsworth)
dunbarb2 [gmail.com]
edo999 [gmail.com]
franck.routier [gmail.com] (Franck Routier)
guido.tapia [gmail.com] (Guido Tapia)
ichaehoi [gmail.com] (Ibrahim Chaehoi)
iliakan [gmail.com] (Ilya Kantor)
ivan.kozik [gmail.com]
jaffathecake [gmail.com] (Jake Archibald)
jamesots [gmail.com]
jhansche [myyearbook.com] (Joe Hansche)
k [ailis.de] (Klaus Reimer)
kosmo.zb [gmail.com]
leeight [gmail.com]
mattcg [gmail.com]
meacer [gmail.com] (Mustafa E. Acer)
mbolin [gmail.com] (Michael Bolin)
neaket [gmail.com]
piaohai [gmail.com] (piaohaiyao)
pimmhogeling [gmail.com]
price.c [gmail.com] (Chris Price)
rictic [gmail.com] (Peter Burns)
robert [gust-bardon.org] (Robert Gust-Bardon)
sheets [ashimaarts.com]
stenrs [gmail.com]
timwintle [gmail.com] (Tim Wintle)
yonathan [gmail.com] (Yonathan Randolph)

View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,292 @@
/*
* Copyright 2009 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// Contents
//
The Closure Compiler performs checking, instrumentation, and
optimizations on JavaScript code. The purpose of this README is to
explain how to build and run the Closure Compiler.
The Closure Compiler requires Java 6 or higher.
http://www.java.com/
//
// Building The Closure Compiler
//
There are three ways to get a Closure Compiler executable.
1) Use one we built for you.
Pre-built Closure binaries can be found at
http://code.google.com/p/closure-compiler/downloads/list
2) Check out the source and build it with Apache Ant.
First, check out the full source tree of the Closure Compiler. There
are instructions on how to do this at the project site.
http://code.google.com/p/closure-compiler/source/checkout
Apache Ant is a cross-platform build tool.
http://ant.apache.org/
At the root of the source tree, there is an Ant file named
build.xml. To use it, navigate to the same directory and type the
command
ant jar
This will produce a jar file called "build/compiler.jar".
3) Check out the source and build it with Eclipse.
Eclipse is a cross-platform IDE.
http://www.eclipse.org/
Under Eclipse's File menu, click "New > Project ..." and create a
"Java Project." You will see an options screen. Give the project a
name, select "Create project from existing source," and choose the
root of the checked-out source tree as the existing directory. Verify
that you are using JRE version 6 or higher.
Eclipse can use the build.xml file to discover rules. When you
navigate to the build.xml file, you will see all the build rules in
the "Outline" pane. Run the "jar" rule to build the compiler in
build/compiler.jar.
//
// Running The Closure Compiler
//
Once you have the jar binary, running the Closure Compiler is straightforward.
On the command line, type
java -jar compiler.jar
This starts the compiler in interactive mode. Type
var x = 17 + 25;
then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
and "Enter" again. The Compiler will respond:
var x=42;
The Closure Compiler has many options for reading input from a file,
writing output to a file, checking your code, and running
optimizations. To learn more, type
java -jar compiler.jar --help
You can read more detailed documentation about the many flags at
http://code.google.com/closure/compiler/docs/gettingstarted_app.html
//
// Compiling Multiple Scripts
//
If you have multiple scripts, you should compile them all together with
one compile command.
java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
The Closure Compiler will concatenate the files in the order they're
passed at the command line.
If you need to compile many, many scripts together, you may start to
run into problems with managing dependencies between scripts. You
should check out the Closure Library. It contains functions for
enforcing dependencies between scripts, and a tool called calcdeps.py
that knows how to give scripts to the Closure Compiler in the right
order.
http://code.google.com/p/closure-library/
//
// Licensing
//
Unless otherwise stated, all source files are licensed under
the Apache License, Version 2.0.
-----
Code under:
src/com/google/javascript/rhino
test/com/google/javascript/rhino
URL: http://www.mozilla.org/rhino
Version: 1.5R3, with heavy modifications
License: Netscape Public License and MPL / GPL dual license
Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
implementation of JavaScript for the JVM. The JavaScript parser and
the parse tree data structures were extracted and modified
significantly for use by Google's JavaScript compiler.
Local Modifications: The packages have been renamespaced. All code not
relevant to parsing has been removed. A JsDoc parser and static typing
system have been added.
-----
Code in:
lib/rhino
Rhino
URL: http://www.mozilla.org/rhino
Version: Trunk
License: Netscape Public License and MPL / GPL dual license
Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
Local Modifications: Minor changes to parsing JSDoc that usually get pushed
up-stream to Rhino trunk.
-----
Code in:
lib/args4j.jar
Args4j
URL: https://args4j.dev.java.net/
Version: 2.0.16
License: MIT
Description:
args4j is a small Java class library that makes it easy to parse command line
options/arguments in your CUI application.
Local Modifications: None.
-----
Code in:
lib/guava.jar
Guava Libraries
URL: http://code.google.com/p/guava-libraries/
Version: 13.0.1
License: Apache License 2.0
Description: Google's core Java libraries.
Local Modifications: None.
-----
Code in:
lib/jsr305.jar
Annotations for software defect detection
URL: http://code.google.com/p/jsr-305/
Version: svn revision 47
License: BSD License
Description: Annotations for software defect detection.
Local Modifications: None.
-----
Code in:
lib/jarjar.jar
Jar Jar Links
URL: http://jarjar.googlecode.com/
Version: 1.1
License: Apache License 2.0
Description:
A utility for repackaging Java libraries.
Local Modifications: None.
----
Code in:
lib/junit.jar
JUnit
URL: http://sourceforge.net/projects/junit/
Version: 4.10
License: Common Public License 1.0
Description: A framework for writing and running automated tests in Java.
Local Modifications: None.
---
Code in:
lib/protobuf-java.jar
Protocol Buffers
URL: http://code.google.com/p/protobuf/
Version: 2.4.1
License: New BSD License
Description: Supporting libraries for protocol buffers,
an encoding of structured data.
Local Modifications: None
---
Code in:
lib/ant.jar
lib/ant-launcher.jar
URL: http://ant.apache.org/bindownload.cgi
Version: 1.8.1
License: Apache License 2.0
Description:
Ant is a Java based build tool. In theory it is kind of like "make"
without make's wrinkles and with the full portability of pure java code.
Local Modifications: None
---
Code in:
lib/json.jar
URL: http://json.org/java/index.html
Version: JSON version 20090211
License: MIT license
Description:
JSON is a set of java files for use in transmitting data in JSON format.
Local Modifications: None
---
Code in:
tools/maven-ant-tasks-2.1.3.jar
URL: http://maven.apache.org
Version 2.1.3
License: Apache License 2.0
Description:
Maven Ant tasks are used to manage dependencies and to install/deploy to
maven repositories.
Local Modifications: None

View File

@ -0,0 +1,505 @@
<!--
Copyright 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="compiler" basedir="." default="jar" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!--
Use -Dtest.class to change what tests are run on the command-line.
i.e., -Dtest.class=CommandLineRunnerTest will run just that test class.
-->
<property name="test.class" value="*Test"/>
<!--
Use -Dtest.fork to specify whether or not to fork the process.
Some machines run better with forking turned off.
-->
<property name="test.fork" value="true"/>
<!-- Force java 6 -->
<property name="ant.build.javac.source" value="1.6" />
<property name="ant.build.javac.target" value="1.6" />
<!-- define other variables -->
<property name="javac.debug" value="on" />
<property name="src.dir" value="${basedir}/src" />
<property name="gen.dir" value="${basedir}/gen" />
<property name="test.dir" value="${basedir}/test" />
<property name="externs.dir" value="${basedir}/externs" />
<!-- To workaround Ant limitation on overriding properties set on the
command-line, define a unique property to allow "build.dir" to
be change without forcing the build of Rhino to the same directory.
-->
<property name="closure.build.dir" value="${basedir}/build" />
<property name="build.dir" value="${closure.build.dir}" />
<property name="buildlib.dir" value="${build.dir}/lib" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="testClasses.dir" value="${build.dir}/test" />
<property name="javadoc.dir" value="${build.dir}/javadoc" />
<property name="stylesheetfile" value="${javadoc.dir}/dev_javadoc.css" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="tools.dir" value="${basedir}/tools" />
<property name="compiler-jarfile"
value="${build.dir}/${ant.project.name}.jar" />
<property name="num-fuzz-tests" value="10000"/>
<property name="jsonml.dir" value="${basedir}/src/com/google/javascript/jscomp/jsonml" />
<property name="jsonml-classes.dir" value = "${build.dir}/jsonml-classes" />
<property name="jsonml-jarfile" value="${build.dir}/secure_compiler.jar" />
<property name="webservice.dir" value="${basedir}/src/com/google/javascript/jscomp/webservice" />
<property name="webservice-classes.dir" value = "${build.dir}/webservice-classes" />
<property name="webservice-jarfile" value="${build.dir}/webservice.jar" />
<!-- The following server is used to deploy releases to maven central via Sonatypes
publishing service which runs on oss.sonatype.org.
You will need to have an account on sonatype.org to push releases. You can
override these values if you want to deploy to a different repository
-->
<property name="maven-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
<property name="maven-repository-id" value="sonatype-nexus-staging" />
<!-- proto compiler used to generate java classes from .proto files -->
<property name="protoc.executable" value="protoc"/>
<property file="build.properties" />
<!-- maven ant tasks -->
<path id="maven-ant-tasks.classpath" path="${tools.dir}/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<!-- gather svn version -->
<target name="svnversion">
<exec outputproperty="build.svnVersion"
executable="svnversion"
failonerror="false"
failifexecutionfails="false"
dir="."/>
</target>
<!-- compile rhino -->
<target name="rhino">
<ant antfile="build.xml"
inheritAll="false"
dir="lib/rhino/"
target="jar">
<property name="build.dir" value="${buildlib.dir}"/>
<property name="no-e4x" value="true"/>
</ant>
</target>
<target name="rhino-jarjar"
depends="rhino"
description="Renamespaces Rhino">
<taskdef name="jarjar"
classname="com.tonicsystems.jarjar.JarJarTask"
classpath="lib/jarjar.jar"/>
<jarjar destfile="${buildlib.dir}/rhino.jar" update="true">
<zipfileset src="${buildlib.dir}/rhino1_7R5pre/js.jar"/>
<rule pattern="org.mozilla.javascript.**"
result="com.google.javascript.rhino.head.@1"/>
</jarjar>
</target>
<target name="protobuf-gen">
<fileset dir="${src.dir}" id="proto.classpath">
<include name="**/*.proto"/>
</fileset>
<pathconvert property="protofiles" pathsep=" " refid="proto.classpath"/>
<echo message="${protoc.executable} -I ${src.dir} --java_out=${gen.dir} ${protofiles}"/>
<exec executable="${protoc.executable}" searchpath="true">
<arg line="-I ${src.dir}"/>
<arg line="--java_out=${gen.dir}"/>
<arg line="${protofiles}"/>
</exec>
</target>
<!-- Generate pom.xml with the proper svn build number -->
<target name="pom" depends="svnversion">
<copy file="closure-compiler.pom" tofile="${build.dir}/pom.xml">
<filterset>
<filter token="build.svnVersion"
value="${build.svnVersion}"/>
</filterset>
</copy>
<property name="compiler-jarfile-nodeps" value="${build.dir}/closure-${ant.project.name}-r${build.svnVersion}.jar" />
<property name="compiler-jarfile-javadoc" value="${build.dir}/closure-${ant.project.name}-r${build.svnVersion}-javadoc.jar" />
<property name="compiler-jarfile-sources" value="${build.dir}/closure-${ant.project.name}-r${build.svnVersion}-sources.jar" />
<artifact:pom id="project" file="${build.dir}/pom.xml" />
</target>
<target name="mvn-install"
depends="jar-nodeps,jar-javadoc,jar-sources,pom"
description="Install closure-compiler artifacts into the local maven repo">
<artifact:install file="${compiler-jarfile-nodeps}">
<pom refid="project"/>
<attach file="${compiler-jarfile-javadoc}" classifier="javadoc"/>
<attach file="${compiler-jarfile-sources}" classifier="sources"/>
</artifact:install>
</target>
<!-- The mvn-deploy target takes the generated maven artifacts and pushes
them to the Sonatype repository. You will need to have a
gpg key defined and account set up. More docs on how to do this here:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
-->
<target name="mvn-deploy"
depends="mvn-install"
description="Signs and Deploys closure-compiler artifacts to the central maven repo">
<!-- sign and deploy the main artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-repository-id}" />
<arg value="-DpomFile=${build.dir}/pom.xml" />
<arg value="-Dfile=${compiler-jarfile-nodeps}" />
<arg value="-Pgpg" />
</artifact:mvn>
<!-- sign and deploy the sources artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-repository-id}" />
<arg value="-DpomFile=${build.dir}/pom.xml" />
<arg value="-Dfile=${compiler-jarfile-sources}" />
<arg value="-Dclassifier=sources" />
<arg value="-Pgpg" />
</artifact:mvn>
<!-- sign and deploy the javadoc artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-repository-id}" />
<arg value="-DpomFile=${build.dir}/pom.xml" />
<arg value="-Dfile=${compiler-jarfile-javadoc}" />
<arg value="-Dclassifier=javadoc" />
<arg value="-Pgpg" />
</artifact:mvn>
</target>
<!-- Sync maven dependencies listed in pom.xml -->
<target name="mvn-deps-sync" description="sync dependencies/jars in closure-compiler.pom to lib" depends="pom">
<artifact:dependencies filesetid="dependency.fileset"
pathid="dependency.classpath"
pomrefid="project"
versionsId="dependency.versions"/>
<mkdir dir="${lib.dir}"/>
<copy todir="${lib.dir}">
<fileset refid="dependency.fileset" />
<!-- This mapper strips off all leading directory information -->
<mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${dependency.versions}" to="flatten" />
</copy>
</target>
<!-- set the classpath for the project -->
<!-- this includes the generated source class files -->
<!-- and every jar in the /lib directory -->
<path id="srcclasspath.path">
<pathelement location="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="args4j.jar"/>
<include name="guava.jar"/>
<include name="json.jar"/>
<include name="jsr305.jar"/>
<include name="protobuf-java.jar"/>
</fileset>
<fileset dir="${buildlib.dir}">
<include name="rhino.jar"/>
</fileset>
</path>
<path id="allclasspath.path">
<pathelement location="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${buildlib.dir}">
<include name="rhino.jar"/>
</fileset>
</path>
<target name="clean" description="delete generated files">
<delete dir="${build.dir}" />
</target>
<target name="compile"
description="compile the source code"
depends="rhino-jarjar,svnversion">
<mkdir dir="${classes.dir}" />
<javac debug="true" srcdir="${gen.dir}"
destdir="${classes.dir}"
excludes=".svn"
>
<classpath refid="srcclasspath.path" />
</javac>
<javac debug="true" srcdir="${src.dir}"
destdir="${classes.dir}"
excludes=".svn,**/jsonml/**,**/webservice/**,**/testing/**"
>
<classpath refid="srcclasspath.path" />
</javac>
<!-- Move Messages.properties where ScriptRuntime.java expects it. -->
<mkdir dir="${classes.dir}/rhino_ast/java/com/google/javascript/rhino/" />
<copy file="${src.dir}/com/google/javascript/rhino/Messages.properties"
todir="${classes.dir}/rhino_ast/java/com/google/javascript/rhino/" />
<!-- Move ParserConfig.properties where ParserRunner.java expects it. -->
<copy file="${src.dir}/com/google/javascript/jscomp/parsing/ParserConfig.properties"
todir="${classes.dir}/com/google/javascript/jscomp/parsing" />
<propertyfile
file="${classes.dir}/com/google/javascript/jscomp/parsing/ParserConfig.properties"
comment="Parser properties">
<entry key="compiler.date" type="date" value="now"/>
<entry key="compiler.version" value="${build.svnVersion}"/>
</propertyfile>
<!-- Move runtime_type_check.js where RuntimeTypeCheck.java expects it. -->
<mkdir dir="${classes.dir}/com/google/javascript/jscomp/js" />
<copy todir="${classes.dir}/com/google/javascript/jscomp/js">
<fileset dir="${src.dir}/com/google/javascript/jscomp/js" />
</copy>
</target>
<target name="jar-nodeps"
depends="compile,pom"
description="package compiler as an executable jar">
<zip destfile="${build.dir}/externs.zip" basedir="${externs.dir}" />
<jar destfile="${compiler-jarfile-nodeps}" update="true">
<fileset dir="${classes.dir}" />
<fileset dir="${build.dir}" includes="externs.zip" />
<zipfileset src="${build.dir}/lib/rhino.jar"/>
</jar>
</target>
<target name="jar"
depends="compile"
description="package compiler as an executable jar">
<zip destfile="${build.dir}/externs.zip" basedir="${externs.dir}" includes="*.js" />
<jar destfile="${compiler-jarfile}" update="true">
<fileset dir="${classes.dir}" />
<fileset dir="${build.dir}" includes="externs.zip" />
<zipfileset src="${lib.dir}/args4j.jar"/>
<zipfileset src="${lib.dir}/guava.jar"/>
<zipfileset src="${lib.dir}/json.jar"/>
<zipfileset src="${lib.dir}/jsr305.jar"/>
<zipfileset src="${lib.dir}/protobuf-java.jar"/>
<zipfileset src="${buildlib.dir}/rhino.jar"/>
<manifest>
<attribute name="Main-Class"
value="com.google.javascript.jscomp.CommandLineRunner" />
</manifest>
</jar>
</target>
<target name="compile-tests"
depends="compile"
description="compile the JUnit tests">
<mkdir dir="${testClasses.dir}" />
<javac debug="true" srcdir="${src.dir}"
destdir="${testClasses.dir}"
excludes=".svn"
>
<classpath refid="allclasspath.path" />
</javac>
<javac debug="true" srcdir="${test.dir}"
destdir="${testClasses.dir}"
excludes=".svn"
>
<classpath refid="allclasspath.path" />
</javac>
</target>
<target name="all-classes-jar"
depends="compile,compile-tests"
description="package the compiler and its tests into one jar">
<jar destfile="${compiler-jarfile}" update="true">
<fileset dir="${testClasses.dir}" />
<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>
<zipfileset src="${buildlib.dir}/rhino.jar"/>
</jar>
</target>
<target name="test"
depends="compile-tests"
description="Compile and execute the JUnit tests.">
<mkdir dir="build/testoutput"/>
<junit printsummary="on" fork="${test.fork}"
forkmode="once" showoutput="true"
failureproperty="junit.failure">
<classpath refid="allclasspath.path" />
<classpath>
<pathelement location="${build.dir}/test" />
</classpath>
<batchtest todir="build/testoutput">
<formatter type="brief" usefile="false" />
<formatter type="xml" />
<fileset dir="${build.dir}/test">
<include name="**/${test.class}.class" />
</fileset>
</batchtest>
</junit>
<junitreport>
<fileset dir="build/testoutput" includes="*.xml"/>
<report todir="build/testoutput"/>
</junitreport>
<fail if="junit.failure"
message="Unit tests failed. See build/testoutput/index.html" />
</target>
<target name="fuzz-test"
depends="all-classes-jar"
description="checks the compiler against a variety of js programs">
<exec executable="java" failonerror="true">
<arg value="-cp" />
<arg value="${compiler-jarfile}" />
<arg value="com.google.javascript.jscomp.regtests.CompileEachLineOfProgramOutput" />
<arg value="generatejs"/>
<arg value="--stdout"/>
<arg value="${num-fuzz-tests}"/>
</exec>
</target>
<target name="javadoc"
description="generate Javadoc"
depends="rhino-jarjar">
<mkdir dir="${javadoc.dir}" />
<javadoc
destdir="${javadoc.dir}"
author="false"
protected="true"
windowtitle="Compiler"
additionalparam=" -notimestamp "
stylesheetfile="${stylesheetfile}">
<sourcepath>
<pathelement location="${src.dir}" />
<pathelement location="${gen.dir}" />
</sourcepath>
<classpath refid="allclasspath.path" />
<link href="http://java.sun.com/javase/6/docs/api/" />
<bottom><![CDATA[
<div id="footer">
<div id="footerlogo">
<img src="http://www.google.com/images/art.gif"
alt="Google colored balls">
</div>
<div id="copyright">
<p>&copy; 2009 Google -
<a href="http://www.google.com/privacy.html">Privacy Policy</a> -
<a href="http://www.google.com/terms_of_service.html">Terms and Conditions</a> -
<a href="http://www.google.com/about.html">About Google</a>
</p>
</div>
</div>
]]>
</bottom>
</javadoc>
</target>
<target name="jar-javadoc" depends="javadoc">
<jar jarfile="${compiler-jarfile-javadoc}">
<fileset dir="${javadoc.dir}" />
</jar>
</target>
<target name="jar-sources" depends="javadoc">
<jar jarfile="${compiler-jarfile-sources}">
<fileset dir="${src.dir}" />
<fileset dir="${gen.dir}" />
</jar>
</target>
<!-- JsonML package related targets -->
<!-- set the classpath for the project -->
<!-- this includes the generated source class files -->
<!-- and every jar in the /lib directory -->
<path id="jsonml-classpath.path">
<pathelement location="${classes.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${classes.dir}">
<include name="*.class" />
</fileset>
<fileset dir="${buildlib.dir}">
<include name="rhino.jar"/>
</fileset>
</path>
<target name="jsonml-compile"
description="compile the source code of classes from JsonML package"
depends="compile">
<mkdir dir="${jsonml-classes.dir}" />
<javac debug="true" srcdir="${jsonml.dir}"
destdir="${jsonml-classes.dir}"
excludes=".svn"
>
<classpath refid="jsonml-classpath.path" />
</javac>
</target>
<target name="jsonml-jar"
description="package the compiler and JsonML classes"
depends="jsonml-compile, compile">
<zip destfile="${build.dir}/externs.zip" basedir="${externs.dir}" includes="*.js" />
<jar destfile="${jsonml-jarfile}" update="true">
<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>
<zipfileset src="${buildlib.dir}/rhino.jar"/>
<fileset dir="${classes.dir}" />
<fileset dir="${jsonml-classes.dir}" />
</jar>
</target>
<target name="webservice-compile"
description="compile the source code of classes from the webservice package"
depends="compile">
<mkdir dir="${webservice-classes.dir}" />
<javac debug="true" srcdir="${webservice.dir}"
destdir="${webservice-classes.dir}"
excludes=".svn"
>
<classpath refid="jsonml-classpath.path" />
</javac>
</target>
<target name="webservice-jar"
description="package the compiler and Webservice classes"
depends="webservice-compile, compile">
<zip destfile="${build.dir}/externs.zip" basedir="${externs.dir}" includes="*.js" />
<jar destfile="${webservice-jarfile}" update="true">
<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>
<zipfileset src="${buildlib.dir}/rhino.jar"/>
<fileset dir="${classes.dir}" />
<fileset dir="${webservice-classes.dir}" />
</jar>
</target>
</project>

View File

@ -0,0 +1,177 @@
<!--
Copyright 2009 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
<packaging>jar</packaging>
<name>Closure Compiler</name>
<version>r@build.svnVersion@</version>
<url>http://code.google.com/p/closure-compiler/</url>
<description>
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
</description>
<inceptionYear>2009</inceptionYear>
<scm>
<connection>
scm:svn:http://closure-compiler.googlecode.com/svn/trunk
</connection>
<developerConnection>
scm:svn:https://closure-compiler.googlecode.com/svn/trunk
</developerConnection>
<url>
http://code.google.com/p/closure-compiler/source/browse/#svn/trunk
</url>
</scm>
<issueManagement>
<system>code.google.com</system>
<url>http://code.google.com/p/closure-compiler/issues</url>
</issueManagement>
<organization>
<name>Google</name>
<url>http://www.google.com</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>caja</id>
<url>http://google-caja.googlecode.com/svn/maven</url>
</repository>
</repositories>
<developers>
<developer>
<id>johnlenz</id>
<name>John Lenz</name>
<email>concavelenz@gmail.com</email>
</developer>
<developer>
<id>nicksantos</id>
<name>Nick Santos</name>
<email>nicholas.j.santos@gmail.com</email>
</developer>
<developer>
<id>acleung</id>
<name>Alan Leung</name>
<email>acleung@gmail.com</email>
</developer>
<developer>
<id>mbolin</id>
<name>Michael Bolin</name>
<email>mbolin@alum.mit.edu</email>
</developer>
<developer>
<id>plindner</id>
<name>Paul Lindner</name>
<email>lindner@inuus.com</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>13.0.1</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.8.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
</dependency>
<dependency>
<groupId>com.googlecode.jarjar</groupId>
<artifactId>jarjar</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>caja</groupId>
<artifactId>caja</artifactId>
<version>r4939</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,288 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview External declarations for common container JS.
*
* TODO(uix-eng): May want a way to conveniently generate this externs to avoid
* manual changes when we merge Shindig.
*
* @externs
*/
google.container = {};
////////////////////////////////////////////////////////////////////////////////
// Externs from container.js
////////////////////////////////////////////////////////////////////////////////
google.container.ContainerConfig = {};
google.container.ContainerRender = {};
/**
* @param {Object} config
* @constructor
*/
google.container.Container = function(config) {};
/**
* @param {Object=} opt_config
*/
google.container.Container.prototype.onConstructed = function(opt_config) {};
/**
* Create a new gadget site.
* @param {Element} gadgetEl
* @param {Element=} opt_bufferEl
* @return {google.container.GadgetSite}
*/
google.container.Container.prototype.newGadgetSite = function(gadgetEl,
opt_bufferEl) {};
/**
* @param {string} id
* @return {google.container.GadgetSite}
* @nosideeffects
*/
google.container.Container.prototype.getGadgetSite = function(id) {};
/**
* @param {string} id
* @return {google.container.GadgetHolder}
* @nosideeffects
*/
google.container.Container.prototype.getGadgetHolder = function(id) {};
/**
* @param {google.container.GadgetSite} site
* @param {string} gadgetUrl
* @param {Object} gadgetParams
* @param {Object} renderParams
* @param {Function=} opt_callback
*/
google.container.Container.prototype.navigateGadget = function(
site, gadgetUrl, gadgetParams, renderParams, opt_callback) {};
/**
* @param {google.container.GadgetSite} site
*/
google.container.Container.prototype.closeGadget = function(site) {};
/**
* @param {Object} request
*/
google.container.Container.prototype.preloadGadgets = function(request) {};
/**
* @param {string} url
* @param {function(Object)=} opt_callback
*/
google.container.Container.prototype.getGadgetMetadata = function(url,
opt_callback) {};
////////////////////////////////////////////////////////////////////////////////
// Externs from gadget_site.js
////////////////////////////////////////////////////////////////////////////////
/**
* @param {google.container.Service} service
* @param {Element} gadgetEl
* @param {Element=} opt_bufferEl
* @constructor
*/
google.container.GadgetSite = function(service, gadgetEl, opt_bufferEl) {};
google.container.GadgetSite.prototype.onConstructed = function() {};
/**
* @param {number} height
*/
google.container.GadgetSite.prototype.setHeight = function(height) {};
/**
* @param {number} width
*/
google.container.GadgetSite.prototype.setWidth = function(width) {};
/**
* @param {number} value
*/
google.container.GadgetSite.prototype.setParentId = function(value) {};
/**
* @return {number}
* @nosideeffects
*/
google.container.GadgetSite.prototype.getId = function() {};
/**
* @return {google.container.GadgetHolder}
* @nosideeffects
*/
google.container.GadgetSite.prototype.getActiveGadgetHolder = function() {};
/**
* @param {string} name
* @param {Object=} opt_gadgetInfo
* @return {Object}
* @nosideeffects
*/
google.container.GadgetSite.prototype.getFeature = function(name,
opt_gadgetInfo) {};
/**
* @param {string} id
* @return {google.container.GadgetHolder}
* @nosideeffects
*/
google.container.GadgetSite.prototype.getGadgetHolder = function(id) {};
/**
* @return {string}
* @nosideeffects
*/
google.container.GadgetSite.prototype.getParentId = function() {};
/**
* @param {string} gadgetUrl
* @param {Object} gadgetParams
* @param {Object} renderParams
* @param {Function=} opt_callback
*/
google.container.GadgetSite.prototype.navigateTo = function(gadgetUrl,
gadgetParams, renderParams, opt_callback) {};
/**
* @param {Object} gadgetInfo
* @param {Object} gadgetParams
* @param {Object} renderParams
*/
google.container.GadgetSite.prototype.render = function(
gadgetInfo, gadgetParams, renderParams) {};
/**
* @param {string} serviceName
* @param {Function} callback
* @param {...number} var_args
*/
google.container.GadgetSite.prototype.rpcCall = function(serviceName, callback,
var_args) {};
google.container.GadgetSite.prototype.close = function() {};
////////////////////////////////////////////////////////////////////////////////
// Externs from gadget_holder.js
////////////////////////////////////////////////////////////////////////////////
/**
* @param {number} siteId
* @param {Element} el
* @constructor
*/
google.container.GadgetHolder = function(siteId, el) {};
google.container.GadgetHolder.prototype.onConstructed = function() {};
/**
* @return {Element}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getElement = function() {};
/**
* @return {string}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getIframeId = function() {};
/**
* @return {Object}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getGadgetInfo = function() {};
google.container.GadgetHolder.prototype.dispose = function() {};
/**
* @return {string}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getUrl = function() {};
/**
* @return {string}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getView = function() {};
/**
* @return {Element}
* @nosideeffects
*/
google.container.GadgetHolder.prototype.getIframeElement = function() {};
/**
* @param {string} value
*/
google.container.GadgetHolder.prototype.setSecurityToken = function(value) {};
/**
* @param {Object} gadgetInfo
* @param {Object} gadgetParams
* @param {Object} renderParams
*/
google.container.GadgetHolder.prototype.render = function(gadgetInfo,
gadgetParams, renderParams) {};
////////////////////////////////////////////////////////////////////////////////
// Externs from service.js
////////////////////////////////////////////////////////////////////////////////
google.container.ServiceConfig = {};
/**
* @param {Object=} opt_config
* @constructor
*/
google.container.Service = function(opt_config) {};
/**
* @param {Object} request
* @param {function(Object)=} opt_callback
*/
google.container.Service.prototype.getGadgetMetadata = function(request,
opt_callback) {};
/**
* @param {Object} request
* @param {function(Object)=} opt_callback
*/
google.container.Service.prototype.getGadgetToken = function(request,
opt_callback) {};
/**
* @param {string} url
* @return {Object}
*/
google.container.Service.prototype.getCachedGadgetMetadata = function(url) {};
/**
* @param {string} url
* @return {Object}
*/
google.container.Service.prototype.getCachedGadgetToken = function(url) {};

View File

@ -0,0 +1,342 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs file for the Iframes library.
* @externs
*/
/**
* The namespace for most of the APIs.
* @type {!iframes.Iframes}
* @suppress {checkTypes} In some crazy locations, this is being used as a
* source file. It needs to be assigned to some object so that the
* iframes.Iframes definition doesn't fail.
*/
var iframes = /** @type {!iframes.Iframes} */ ({});
/**
* The namespace for most of the APIs.
*
* This has "|undefined" so that JSCompiler won't optimize out existence checks
* for win.iframes.
*
* @type {!iframes.Iframes|undefined}
*/
Window.prototype.iframes;
/**
* The type for the Iframes API.
* @constructor
*/
iframes.Iframes = function() {};
/**
* Gets the handler for a given style.
*
* @param {string} style
* @return {Object|Function} The handler for the given style.
*/
iframes.Iframes.prototype.getHandler = function(style) {};
/**
* Sets the handler for a given style.
*
* @param {string} style
* @param {Object|Function} handler The handler for a given style.
* If the style handle is a function, the object returned by this
* function providing the iframe as the parameter is used as the
* actual style handler for every iframe opened in the style it
* handles.
* The follow methods of the handler are significant (note
* that the iframe parameter only presents when the original
* style handler is not a function):
* open(iframe): called to open the iframe.
* call iframe.openInto(el) to perform the open action.
* onready(iframe): called when the iframe is ready.
* close(iframe): called to close the iframe.
*/
iframes.Iframes.prototype.setHandler = function(style, handler) {};
/**
* Gets a deferred-loaded style handler.
* @param {string} style The name of the style.
* @return {?function(function())} The deferred loader, if any.
*/
iframes.Iframes.prototype.getDeferredHandler = function(style) {};
/**
* Sets a deferred-loaded style handler.
* @param {string} style The name of the style.
* @param {function(function())} loader The method to load the new style
* handler, which should call iframes.setHandler for that style.
* It then needs to call the callback method passed in.
*/
iframes.Iframes.prototype.setDeferredHandler = function(style, loader) {};
/**
* This is an internal class to represent an iframe, not the DOM element.
* @constructor
*/
iframes.Iframe = function() {};
/**
* Methods used to pass to the iframe being opened.
* @return {Object}
*/
iframes.Iframe.prototype.getMethods = function() {};
/**
* Parameters used for opening the widget.
* @return {Object}
*/
iframes.Iframe.prototype.getOpenParams = function() {};
/**
* Parameters used to pass to the iframe being opened.
* @return {Object}
*/
iframes.Iframe.prototype.getParams = function() {};
/**
* @type {Element}
* @deprecated
*/
iframes.Iframe.prototype.containerDiv;
/**
* DOM reference to element containing iframe element.
*
* @return {Element}
*/
iframes.Iframe.prototype.getSiteEl = function() {};
/**
* @param {Element} element DOM element containing the iframe element.
*/
iframes.Iframe.prototype.setSiteEl = function(element) {};
/**
* DOM reference to the iframe element containing the widget.
*
* @return {Element}
*/
iframes.Iframe.prototype.getIframeEl = function() {};
/**
* generated ID that will be set on the widget when it is opened
*
* @return {string}
*/
iframes.Iframe.prototype.getId = function() {};
/**
* Iframe class instance that opened our Iframe instance.
*
* @return {iframes.Iframe}
*/
iframes.Iframe.prototype.getOpenerIframe = function() {};
/**
* Exposes the method so it can be called from iframe object.
* This is supposed be called by the style handler while handling 'open'
* before calling 'openInto'.
*
* @param {string} name Name of the method as being called.
* @param {Function} method The method to be exposed.
*/
iframes.Iframe.prototype.exposeMethod = function(name, method) {};
/**
* @param {string|Element} el The DOM element or its ID to open the iframe
* into.
* @param {Object=} opt_iframeAttributes Key-value pairs of iframe attributes.
* @return {iframes.Iframe} This iframe object (not the DOM element).
**/
iframes.Iframe.prototype.openInto = function(el, opt_iframeAttributes) {};
/**
* Close the iframe.
*
* @param {*=} opt_params Data to pass to the callback.
* @return {*} The result from the callback function.
*/
iframes.Iframe.prototype.close = function(opt_params) {};
/**
* Removes the iframe element from the DOM tree.
*/
iframes.Iframe.prototype.remove = function() {};
/**
* Adds a callback method for a given type of event.
*
* @param {string} type The event type: e.g. 'ready' or 'close'.
* @param {Function} callback The callback method.
*/
iframes.Iframe.prototype.addCallback = function(type, callback) {};
/**
* Removes a callback method for a given type of event.
*
* @param {string} type The event type used in 'addCallback'.
* @param {Function} callback The callback method used in 'addCallback'.
*/
iframes.Iframe.prototype.removeCallback = function(type, callback) {};
/**
* Allows a global function for all iframes.
*
* @param {string} name The name of the method for the iframes.
* @param {?function(...[*]) : *=} opt_func A optional function, by default
* window[name].
*/
iframes.Iframes.prototype.allow = function(name, opt_func) {};
/**
* Opens an iframe.
*
* WARNING: This API takes ownership of all object parameters and will
* modify them. Make a copy if you want to reuse them.
*
* @param {string} url The URL of the iframe to be opened.
* @param {Object} openParams The parameters for opening the iframe.
* style: specify which handler is used.
* For the default handler, the follow attributes are used:
* element: the element which the iframe would be opened into.
* @param {Object} params The data to be passed to the iframe.
* All properties should be string.
* @param {Object|function(...[*]) : *=} opt_methods: Functions to passed to
* the iframe. All properties should be functions. If no 'callback'
* argument is provided and the argument in this position is a function
* instead of an object, it is considered as the next parameter
* 'callback', not this parameter 'methods'.
* @param {?function(...[*]) : *=} opt_callback: a callback function called
* when the iframe is closed.
*
* @return {iframes.Iframe} The opened iframe.
*/
iframes.Iframes.prototype.open = function(
url, openParams, params, opt_methods, opt_callback) {};
/**
* Closes this iframe.
*
* @param {*=} opt_params The parameters to pass back to the parent iframe.
* @param {?function(...[*]) : *=} opt_callback The callback function after
* parent processed the event.
*/
iframes.Iframes.prototype.close = function(opt_params, opt_callback) {};
/**
* Indicates that this iframe is ready. The exactly semantic depends on
* the style handler, but generally it means ready to be displayed and
* it should be called the page is drawn and initial data loaded.
*
* @param {Object=} opt_params The parameters to pass back to the parent iframe.
* @param {Object|function(...[*]) : *=} opt_methods: Functions to passed to
* the iframe. All properties should be functions. If no 'callback'
* argument is provided and the argument in this position is a function
* instead of an object, it is considered as the next parameter
* 'callback', not this parameter 'methods'.
* @param {?function(...[*]) : *=} opt_callback The callback function after
* parent processed the event.
*/
iframes.Iframes.prototype.ready = function(
opt_params, opt_methods, opt_callback) {};
/**
* Passes the parent's origin and referer to the callback.
* @param {Function} callback Function
* that will get parent info passed to it.
*/
iframes.Iframes.prototype.getParentInfo = function(callback) {};
/**
* Export browser events to your opener.
* @param {Array.<string>} events List of events to export. Currently only
* supports mouseover and mouseout.
*/
iframes.Iframes.prototype.propagate = function(events) {};
/**
* Asks the parent window to change the width and height of this iframe.
*
* @param {Object} params The width and/or height in number of pixels to be
* resized. Use 'height': 'auto' for current window content height.
*/
iframes.Iframes.prototype.resize = function(params) {};
/**
* @param {Object} params
* @deprecated
*/
iframes.Iframes.prototype.resizeMe = function(params) {};
/**
* @return {string} The full URI for the Google Connect JS bundle.
*/
iframes.Iframes.prototype.getGoogleConnectJsUri = function() {};
/**
* Allows client to override the Google Connect JS to use.
* @param {string} version The versioned JS file to use.
*/
iframes.Iframes.prototype.setGoogleConnectJsVersion = function(version) {};
/**
* Allows the client to use a different JS hint.
* @param {string} hint The JS hint to use.
*/
iframes.Iframes.prototype.setJsHint = function(hint) {};
/**
* Allows the client to use a different bootstrap hint.
* @param {string} hint The bootstrap hint to use.
*/
iframes.Iframes.prototype.setBootstrapHint = function(hint) {};
/**
* @param {string} version
* @deprecated
*/
iframes.Iframes.prototype.setVersionOverride = function(version) {};
/**
* Inside an iframe, the properties of the iframer object are the data and
* functions provided in iframes.open.
* @type {!Object|undefined}
*/
Window.prototype.iframer = {};
/**
* Inside an iframe, the properties of the iframer object are the data and
* functions provided in iframes.open.
* @type {!Object|undefined}
*/
iframes.Iframes.prototype.iframer = {};
/**
* Inside an iframe, the properties of the iframer object are the data and
* functions provided in iframes.open.
* @type {!Object}
*/
var iframer = {};

View File

@ -0,0 +1,55 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs file for OAuth specific functionality in the OpenSocial
* gadget libraries. Note this may not be comprehensive.
* @see http://code.google.com/apis/gadgets/docs/oauth.html
* @externs
*/
// Namespace for OAuth
gadgets.oauth = {};
/**
* An OAuth popup for granting one time access to user data.
* @param {string} destination Target URL for the popup window.
* @param {string} windowOptions Options for window.open, used to specify
* look and feel of the window.
* @param {Function} openCallback Function to call when the window is
* opened.
* @param {Function} closeCallback Function to call when the window is
* closed.
* @constructor
*/
gadgets.oauth.Popup = function(destination, windowOptions,
openCallback, closeCallback) {};
/**
* @return {Function} An onclick handler for the "open the approval window"
* link
*/
gadgets.oauth.Popup.prototype.createOpenerOnClick = function() {};
/**
* @return {Function} An onclick handler for the "I've approved" link.
* This may not ever be called. If we successfully detect that the
* window was closed, this link is unnecessary.
*/
gadgets.oauth.Popup.prototype.createApprovedOnClick = function() {};

View File

@ -0,0 +1,26 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs file for OAuth2 specific functionality in OpenSocial
* gadget libraries.
* @externs
*/
// Namespace for OAuth2
var oauth2 = {};

View File

@ -0,0 +1,598 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs file for OpenSocial gadget libraries. Legacy API based
* on the {@code _IG_...} is not supported here.
* Note this may not be comprehensive.
*
* @see http://code.google.com/apis/gadgets/docs/reference/
* @see http://incubator.apache.org/shindig/shindig-1.1.x/shindig-features/jsdoc
* @externs
*/
// Root namespace for gadget related functionality.
var gadgets = {};
// Namespace providing operations for getting information about and modifying
// the window the gadget is placed in.
gadgets.window = {};
/**
* @param {number=} opt_height The new height for the gadget.
*/
gadgets.window.adjustHeight = function(opt_height) {};
/**
* @return {Object} Dimensions for the viewport.
*/
gadgets.window.getViewportDimensions = function() {};
/**
* @param {string} title The new title for the gadget.
*/
gadgets.window.setTitle = function(title) {};
/**
* Calculate inner content height is hard and different between
* browsers rendering in Strict vs. Quirks mode. We use a combination of
* three properties within document.body and document.documentElement:
* - scrollHeight
* - offsetHeight
* - clientHeight
* These values differ significantly between browsers and rendering modes.
* But there are patterns. It just takes a lot of time and persistence
* to figure out.
* @return {number} Height of current window.
*/
gadgets.window.getHeight = function() {};
// Namespace providing operations for making remote procedure calls for
// gadget-to-container, container-to-gadget and gadget-to-gadget communication.
gadgets.rpc = {};
/**
* Exported constant used by transports.
* @type {string}
*/
gadgets.rpc.ACK;
/**
* @param {?string} targetId The id of the target gadget, null for container.
* @param {string} serviceName The RPC service to call.
* @param {!Function=} opt_callback Function called when the RPC
* completes.
* @param {...*} var_args Variable arguments that are passed to the RPC handler.
*/
gadgets.rpc.call = function(targetId, serviceName, opt_callback, var_args) {};
/**
* Force RPC utilities to fallback to secure mechanisms for type=URL gadgets.
*/
gadgets.rpc.forceParentVerifiable = function() {};
/**
* @return {string} The RPC relay mechanism.
*/
gadgets.rpc.getRelayChannel = function() {};
/**
* @param {string} targetId The frame ID to get the relay for.
* @return {string} The relay URL of the given gadget (or container).
*/
gadgets.rpc.getRelayUrl = function(targetId) {};
/**
* Global init for RPC code.
*/
gadgets.rpc.init = function() {};
/**
* Receives and processes an RPC request. (Not to be used directly.)
* Only used by IFPC.
* @param {Array.<string>} fragment An RPC request fragment encoded as
* an array. The first 4 elements are target id, source id & call id,
* total packet number, packet id. The last element stores the actual
* JSON-encoded and URI escaped packet data.
*/
gadgets.rpc.receive = function(fragment) {};
/**
* @param {string} serviceName The RPC service to register a handler for.
* @param {!Function} handler Handler for an RPC call, return
* value will be sent back to the caller.
*/
gadgets.rpc.register = function(serviceName, handler) {};
/**
* @param {!Function} handler Handler for unknown RPC calls,
* return value will be sent back to the caller.
*/
gadgets.rpc.registerDefault = function(handler) {};
/**
* Helper method to retrieve the auth token for a given gadget.
* @param {string} targetId Name of the target frame.
* @return {string} The authentication token registered for this
* target id.
*/
gadgets.rpc.getAuthToken = function(targetId) {};
/**
* Helper method returning a canonicalized protocol://host[:port] for
* a given input URL, provided as a string. Used to compute convenient
* relay URLs and to determine whether a call is coming from the same
* domain as its receiver (bypassing the try/catch capability detection
* flow, thereby obviating Firebug and other tools reporting an exception).
* @param {string} url Base URL to canonicalize.
* @return {string} The canonicalized URL.
*/
gadgets.rpc.getOrigin = function(url) {};
/**
* Helper method returning a canonicalized protocol://host[:port] for
* the relay URL of a given target frame.
* @param {string} id Name of the target frame.
* @return {string} The canonicalized URL.
*/
gadgets.rpc.getTargetOrigin = function(id) {};
/**
* Sets the auth token of a target frame.
* @param {string} targetId Name of the target frame.
* @param {string} token The authentication token to use for all calls to or
* from this target id.
*/
gadgets.rpc.setAuthToken = function(targetId, token) {};
/**
* Sets the relay URL of a target frame.
* @param {string} targetId The id of the target gadget.
* @param {string} url Full relay URL of the target frame.
* @param {boolean=} opt_useLegacy True if this relay needs the legacy IFPC
* wire format.
*/
gadgets.rpc.setRelayUrl = function(targetId, url, opt_useLegacy) {};
/**
* Setups the gadgets.rpc library to communicate with the receiver. This method
* replaces setAuthToken and setRelayUrl.
* @param {string} targetId The id of the target gadget.
* @param {string=} opt_receiverUrl Full relay URL of the target frame.
* @param {boolean=} opt_authToken null The authentication token to use for all
* calls to or from this target id.
*/
gadgets.rpc.setupReceiver = function(targetId, opt_receiverUrl, opt_authToken) {};
/**
* @param {string} serviceName The RPC service to unregister the handler for.
*/
gadgets.rpc.unregister = function(serviceName) {};
/**
* Unregisters the default service handler. Future unknown RPC
* calls will fail silently.
*/
gadgets.rpc.unregisterDefault = function() {};
/**
* Class providing access to user preferences, module dimensions, and messages.
* @param {string=} opt_moduleId An optional module ID to get preferences for.
* @constructor
*/
gadgets.Prefs = function(opt_moduleId) {};
/**
* @param {string} key The user preference key.
* @return {Array.<string>} The array value of the preference.
*/
gadgets.Prefs.prototype.getArray = function(key) {};
/**
* @param {string} key The user preference key.
* @return {boolean} The boolean value of the preference.
*/
gadgets.Prefs.prototype.getBool = function(key) {};
/**
* @param {string} key The user preference key.
* @return {number} The float value of the preference.
*/
gadgets.Prefs.prototype.getFloat = function(key) {};
/**
* @param {string} key The user preference key.
* @return {number} The int value of the preference.
*/
gadgets.Prefs.prototype.getInt = function(key) {};
/**
* @param {string} key The user preference key.
* @return {string} The string value of the preference.
*/
gadgets.Prefs.prototype.getString = function(key) {};
/**
* @return {string} The country code.
*/
gadgets.Prefs.prototype.getCountry = function() {};
/**
* @return {string} The language code.
*/
gadgets.Prefs.prototype.getLang = function() {};
/**
* @return {number} The module's id.
*/
gadgets.Prefs.prototype.getModuleId = function() {};
/**
* @param {string} key The message key.
* @return {string} The unformatted message.
*/
gadgets.Prefs.prototype.getMsg = function(key) {};
/**
* @param {string} key The preference key.
* @param {string|number} value The preference value.
*/
gadgets.Prefs.prototype.set = function(key, value) {};
/**
* @param {string} key The preference key.
* @param {Array.<string>} array The preference array.
*/
gadgets.Prefs.prototype.setArray = function(key, array) {};
// Namespace for embedding flash content in gadgets.
gadgets.flash = {};
/**
* @return {boolean} Injects the cached Flash file into the DOM tree.
*/
gadgets.flash.embedCachedFlash = function() {};
/**
* @return {number} The major version of Flash Player or 0 if Flash is not
* supported.
*/
gadgets.flash.getMajorVersion = function() {};
/**
* @param {string} url The URL of the flash to embed.
* @param {string|Element} container The ID or object reference to the
* existing HTML container.
* @param {number} minVersion The minimum version required.
* @param {Object=} opt_params An optional object that may contain any valid
* HTML parameters that will be passed to the Flash movie.
* @return {boolean} Whether the function call completes successfully.
*/
gadgets.flash.embedFlash = function(
url, container, minVersion, opt_params) {};
// Namespace for retrieving content from remote servers via the gadgets proxy.
gadgets.io = {};
/**
* Gets the proxy version of the passed-in URL.
*
* @param {string} url The URL to get the proxy URL for
* @param {Object=} opt_params Optional Parameter Object.
* The following properties are supported:
* .REFRESH_INTERVAL The number of seconds that this
* content should be cached. Defaults to 3600.
*
* @return {string} The proxied version of the URL
*/
gadgets.io.getProxyUrl = function(url, opt_params) {};
/**
* @param {string} url The URL to request data from.
* @param {Function} callback The callback function.
* @param {Object=} opt_params Optional map of parameters sent on request, see
* gadgets.io.RequestParameters.
*/
gadgets.io.makeRequest = function(url, callback, opt_params) {};
/**
* Converts an input object into a URL-encoded data string. (key=value&...).
* @param {Object} fields The post fields you wish to encode.
* @return {string} The processed post data; this includes a trailing
* ampersand (&).
*/
gadgets.io.encodeValues = function(fields) {};
/**
* Enumeration of request parameters.
* @enum {string}
*/
gadgets.io.RequestParameters = {};
gadgets.io.RequestParameters.AUTHORIZATION;
gadgets.io.RequestParameters.CONTENT_TYPE;
gadgets.io.RequestParameters.GET_SUMMARIES;
gadgets.io.RequestParameters.HEADERS;
gadgets.io.RequestParameters.METHOD;
gadgets.io.RequestParameters.NUM_ENTRIES;
gadgets.io.RequestParameters.OAUTH_REQUEST_TOKEN;
gadgets.io.RequestParameters.OAUTH_REQUEST_TOKEN_SECRET;
gadgets.io.RequestParameters.OAUTH_SERVICE_NAME;
gadgets.io.RequestParameters.OAUTH_TOKEN_NAME;
gadgets.io.RequestParameters.OAUTH_USE_TOKEN;
gadgets.io.RequestParameters.POST_DATA;
gadgets.io.RequestParameters.REFRESH_INTERVAL;
/**
* Enumeration of content types that can be specified in
* {@link gadgets.io.RequestParameters.AUTHORIZATION}
* @enum {string}
*/
gadgets.io.AuthorizationType = {};
gadgets.io.AuthorizationType.NONE;
gadgets.io.AuthorizationType.OAUTH;
gadgets.io.AuthorizationType.SIGNED;
/**
* Enumeration of content types that can be specified in
* {@link gadgets.io.RequestParameters.CONTENT_TYPE}
* @enum {string}
*/
gadgets.io.ContentType = {};
gadgets.io.ContentType.DOM;
gadgets.io.ContentType.FEED;
gadgets.io.ContentType.JSON;
gadgets.io.ContentType.TEXT;
/**
* Enumeration of content types that can be specified in
* {@link gadgets.io.RequestParameters.METHOD}
* @enum {string}
*/
gadgets.io.MethodType = {};
gadgets.io.MethodType.DELETE;
gadgets.io.MethodType.GET;
gadgets.io.MethodType.HEAD;
gadgets.io.MethodType.POST;
gadgets.io.MethodType.PUT;
/**
* This is the response object that is passed to the callback of
* gadgets.io.makeRequest. It is never explicitly called "ResponseObject" in the
* documentation, but the documentation does refer to an object that is passed
* to the callback. This is that object.
* @see http://wiki.opensocial.org/index.php?title=Gadgets.io_(v0.9)#gadgets.io.makeRequest
*/
gadgets.io.ResponseObject = {};
/**@type {Object}*/ gadgets.io.ResponseObject.data;
/**@type {Array.<string>}*/ gadgets.io.ResponseObject.errors;
/**@type {Object}*/ gadgets.io.ResponseObject.headers;
/**@type {number}*/ gadgets.io.ResponseObject.rc;
/**@type {string}*/ gadgets.io.ResponseObject.text;
/**@type {string}*/ gadgets.io.ResponseObject.oauthApprovalUrl;
/**@type {string}*/ gadgets.io.ResponseObject.oauthError;
/**@type {string}*/ gadgets.io.ResponseObject.oauthErrorText;
// Namespace for views
gadgets.views = {};
/**
* Returns the current view.
* @return {gadgets.views.View} The current view.
*/
gadgets.views.getCurrentView = function() {};
/**
* Get parameters passed into the view
* @return {Object} Map string -> string of parameters passed in.
*/
gadgets.views.getParams = function() {};
/**
* @return {Object} Map<gadgets.views.ViewType, String, gadgets.views.View>
* A map of all the supported views. Keys each gadgets.view.View by its name.
*/
gadgets.views.getSupportedViews = function() {};
/**
* @param {gadgets.views.View|string} view The view to navigate to.
* @param {Object=} opt_params Map.<String, String>: Parameters to pass to the
* gadget after it has been navigated to on the surface.
* @param {string=} opt_ownerId The ID of the owner of the page to navigate to;
* defaults to the current owner.
*/
gadgets.views.requestNavigateTo = function(view, opt_params, opt_ownerId) {};
/**
* @constructor
*/
gadgets.views.View = function() {};
/**
* @return {string} Returns the name of this view.
*/
gadgets.views.View.prototype.getName = function() {}
/**
* @return {boolean} True if the gadget is the only visible gadget; otherwise,
* false.
*/
gadgets.views.View.prototype.isOnlyVisibleGadget = function() {};
// Namespace for utilities.
gadgets.util = {};
/**
* Escapes the input using HTML entities to make it safer.
* @param {string} str The string to escape.
* @return {string} The escaped string.
*/
gadgets.util.escapeString = function(str) {};
/**
* Reverses escapeString
* @param {string} str The string to unescape.
* @return {string} The unescaped string.
*/
gadgets.util.unescapeString = function(str) {};
/**
* Returns the parameters for a feature.
* @param {string} feature The feature name.
* @return {Object} Parameters for the feature or null.
*/
gadgets.util.getFeatureParameters = function(feature) {};
/**
* Returns whether the specified feature is supported.
* @param {string} feature The feature name.
* @return {boolean} Whether the feature is supported.
*/
gadgets.util.hasFeature = function(feature) {};
/**
* Registers a function to be called when the gadget loads.
* @param {function()} fn The function to call.
*/
gadgets.util.registerOnLoadHandler = function(fn) {};
/**
* Parses the current document's location and returns an object representing
* the parameters in the query string.
* @param {string=} opt_url Optional URL whose parameters to parse.
* Defaults to window's current URL.
* @return {Object} Parameters from the query string.
*/
gadgets.util.getUrlParameters = function(opt_url) {};
/**
* Creates a closure that is suitable for passing as a callback.
* Any number of arguments may be passed to the callback;
* they will be received in the order they are passed in.
*
* @param {Object} scope The execution scope; may be null if there is no
* need to associate a specific instance of an object with this
* callback
* @param {Function} callback The callback to invoke when this is run;
* any arguments passed in will be passed after your initial arguments
* @param {...*} var_args Initial arguments to be passed to the callback
* @returns {Function} The closure.
*/
gadgets.util.makeClosure = function(scope, callback, var_args) {};
/**
* Attach an event listener to given DOM element (Not a gadget standard)
*
* @param {Object} elem DOM element on which to attach event.
* @param {string} eventName Event type to listen for.
* @param {function()} callback Invoked when specified event occurs.
* @param {boolean} useCapture If true, initiates capture.
*/
gadgets.util.attachBrowserEvent = function(
elem, eventName, callback, useCapture) {};
//Namespace for JSON processing.
gadgets.json = {};
/**
* Convert a JSON object into a string.
* @param {Object} json
* @return {String} The JSON as a string
*/
gadgets.json.stringify = function(json) {};
/**
* Convert a string into a JSON object.
* Uses safe RegEx match before parsing.
* @param {string} s The string
* @return {Object} The JSON
*/
gadgets.json.parse = function(s) {};
//Namespace for config.
gadgets.config = {};
/**
* Registers a configurable component and its configuration parameters.
* Multiple callbacks may be registered for a single component if needed.
*
* @param {string} component The name of the component to register. Should
* be the same as the fully qualified name of the <Require> feature or
* the name of a fully qualified JavaScript object reference
* (e.g. "gadgets.io").
* @param {Object=} opt_validators Mapping of option name to validation
* functions that take the form function(data) {return isValid(data);}
* @param {Function=} opt_callback A function to be invoked when a
* configuration is registered. If passed, this function will be invoked
* immediately after a call to init has been made. Do not assume that
* dependent libraries have been configured until after init is
* complete. If you rely on this, it is better to defer calling
* dependent libraries until you can be sure that configuration is
* complete. Takes the form function(config), where config will be
* all registered config data for all components. This allows your
* component to read configuration from other components.
* @param {boolean=} opt_callOnUpdate Whether the callback shall be call
* on gadgets.config.update() as well.
*/
gadgets.config.register = function(component, opt_validators, opt_callback,
opt_callOnUpdate) {};
/**
* Retrieves configuration data on demand.
*
* @param {string=} opt_component The component to fetch. If not provided
* all configuration will be returned.
* @return {Object} The requested configuration, or an empty object if no
* configuration has been registered for that component.
*/
gadgets.config.get = function(opt_component) {};
/**
* Initializes the configuration.
*
* @param {Object} config The full set of configuration data.
* @param {Boolean=} opt_noValidation True if you want to skip validation.
*/
gadgets.config.init = function(config, opt_noValidation) {};
/**
* Creates an HTML or XHTML element.
* @param {string} tagName The type of element to construct.
* @return {Element} The newly constructed element.
*/
gadgets.util.createElement = function(tagName) {};
/**
* Creates an HTML or XHTML iframe element with attributes.
* @param {Object=} opt_attribs Optional set of attributes to attach. The
* only working attributes are spelled the same way in XHTML attribute
* naming (most strict, all-lower-case), HTML attribute naming (less strict,
* case-insensitive), and JavaScript property naming (some properties named
* incompatibly with XHTML/HTML).
* @return {Element} The DOM node representing body.
*/
gadgets.util.createIframeElement = function(opt_attribs) {};
/**
* Gets the HTML or XHTML body element.
* @return {Element} The DOM node representing body.
*/
gadgets.util.getBodyElement = function() {};

View File

@ -0,0 +1,64 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Extern declarations for namespaces and functions that the
* plusone widget defines.
*
* Contact sandbar-eng@google.com for any changes.
*
* @see https://code.google.com/apis/+1button/#jsapi
* @externs
*/
/**
* Namespace associated with Google APIs.
* @type {Object}
*/
var gapi = {};
/**
* Namespace associated with Plusone API.
* @type {Object}
*/
gapi.plusone = {};
/**
* This renders all +1 tags/classes in the specified container, which may be
* either an element (by value) or a string element ID. This function would be
* used only if the <script> tag sets parsetags to explicit, which you might do
* for performance reasons.
* @param {Element=} opt_container The container for which to render +1 buttons.
* If the container parameter is omitted, all +1 tags and classes on the
* page will be rendered.
*/
gapi.plusone.go = function(opt_container) {};
/**
* This renders a +1 button widget within the specified container element.
* @param {Element|string} id An element by value or a string element ID.
* @param {Object} params +1 tag parameters.
*/
gapi.plusone.render = function(id, params) {};
/**
* Container to define user supplied configuration for the plusone button.
*/
var ___gcfg = {};

View File

@ -0,0 +1,49 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs file for OpenSocial shindig libraries.
* Note this may not be comprehensive.
*
* @see http://incubator.apache.org/shindig/shindig-1.1.x/shindig-features/jsdoc
* @externs
*/
// Root namespace for shindig related functionality.
var shindig = {};
/**
* Implements a safer random() method that is seeded from
* screen width/height and (presumably random/unguessable) mouse
* movement, in an effort to create a better seed for random().
* @return {number} The random number.
*/
shindig.random = function() {};
/**
* Implements a SHA1 hasher.
* @return {{reset: function(), update:
* function((Array.<number>|string),number=), digest:
* function():Array.<number>, digestString: function():string}} SHA1
* hasher object. Methods of the returned object are: reset() which
* resets the internal accumulator, update(bytes, opt_length) which
* adds a byte array or string to the internal accumulator (or
* optionally just a prefix of length opt_length), digest() which
* returns a finalized hash as an array of 20 byte values, and
* digestString() which returns a hex-encoded string containing a
* finalized hash.
*/
shindig.sha1 = function() {};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,142 @@
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for Facebook Javascript SDK
* @see http://developers.facebook.com/docs/reference/javascript/
* @externs
*/
/** @const */
var FB = {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.getsession/
* @return {Object.<*,*>}
*/
FB.getSession = function() { };
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.api/
* @param {string} path
* @param {(string|Object.<string, *>|function(Object.<*,*>))=} method
* @param {(Object.<string, *>|function(Object.<*,*>))=} params
* @param {function(Object.<*,*>)=} callback
*/
FB.api = function(path, method, params, callback) { };
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.getloginstatus/
* @param {function(Object.<*,*>)} callback
* @param {boolean=} force
*/
FB.getLoginStatus = function(callback, force) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.init/
* @param {Object.<string,*>=} opt_opts
*/
FB.init = function(opt_opts) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.login/
* @param {function(Object.<*,*>)} callback
* @param {Object.<string,*>=} opt_opts
*/
FB.login = function(callback, opt_opts) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.logout/
* @param {function(Object.<*,*>)=} callback
*/
FB.logout = function(callback) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.ui/
* @param {Object.<string, *>} params
* @param {function(Object.<*,*>)=} callback
*/
FB.ui = function(params, callback) { };
/** @const */
FB.Event = {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.Event.subscribe/
* @param {string} eventName
* @param {function(Object.<*,*>)} callback
*/
FB.Event.subscribe = function(eventName, callback) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.Event.unsubscribe/
* @param {string} eventName
* @param {function(Object.<*,*>)} callback
*/
FB.Event.unsubscribe = function(eventName, callback) {};
/** @const */
FB.XFBML = {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.XFBML.parse/
* @param {Element=} node
* @param {function(Object.<*,*>)=} callback
*/
FB.XFBML.parse = function(node, callback) {};
/** @const */
FB.Data = {};
/**
* This object is not constructed directly. It is returned by calls to
* FB.Data.Query.
* @constructor
* @private
*/
FB.Data.queryObject = function() {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.data.query/
* @param {string} template
* @param {...(string|number|FB.Data.queryObject)} var_data
* @return {FB.Data.queryObject}
*/
FB.Data.query = function(template, var_data) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.data.waiton/
* @param {Array.<*>} dependencies
* @param {function(Object.<*,*>)} callback
* @return {Object.<*,*>}
*/
FB.Data.waitOn = function(dependencies, callback) {};
/** @const */
FB.Canvas = {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.Canvas.setAutoResize/
* @param {(boolean|number)=} onOrOff
* @param {number=} interval
*/
FB.Canvas.setAutoResize = function(onOrOff, interval) {};
/**
* @see http://developers.facebook.com/docs/reference/javascript/fb.Canvas.setSize/
* @param {Object.<*, number>} params
*/
FB.Canvas.setSize = function(params) {};

View File

@ -0,0 +1,404 @@
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for objects in the synchronous File API, File
* Writer API, and File System API. Details of the API are at:
* http://www.w3.org/TR/FileAPI/
* http://www.w3.org/TR/file-writer-api/
* http://www.w3.org/TR/file-system-api/
*
* @externs
*/
/**
* @see http://www.w3.org/TR/file-writer-api/#idl-def-FileWriterSync
* @constructor
*/
function FileWriterSync() {}
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriterSync-position
* @type {number}
* @const
*/
FileWriterSync.prototype.position;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriterSync-length
* @type {number}
* @const
*/
FileWriterSync.prototype.length;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-write
* @param {!Blob} blob
*/
FileWriterSync.prototype.write = function(blob) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriterSync-seek
* @param {number} offset
*/
FileWriterSync.prototype.seek = function(offset) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriterSync-truncate
* @param {number} size
*/
FileWriterSync.prototype.truncate = function(size) {};
/**
* @see http://www.w3.org/TR/FileAPI/#FileReaderSyncSync
* @constructor
*/
function FileReaderSync() {}
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBufferSync
* @param {!Blob} blob
*/
FileReaderSync.prototype.readAsArrayBuffer = function(blob) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringSync
* @param {!Blob} blob
*/
FileReaderSync.prototype.readAsBinaryString = function(blob) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsTextSync
* @param {!Blob} blob
* @param {string=} encoding
*/
FileReaderSync.prototype.readAsText = function(blob, encoding) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURLSync
* @param {!Blob} blob
*/
FileReaderSync.prototype.readAsDataURL = function(blob) {};
/**
* LocalFileSystemSync interface, implemented by WorkerGlobalScope.
* @see http://www.w3.org/TR/file-system-api/#idl-def-LocalFileSystemSync
* @constructor
*/
function LocalFileSystemSync() {}
/**
* @see http://www.w3.org/TR/file-system-api/
* #the-synchronous-filesystem-interface
* @constructor
*/
function FileSystemSync() {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileSystemSync-name
* @type {string}
* @const
*/
FileSystemSync.prototype.name;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileSystemSync-root
* @type {!DirectoryEntrySync}
* @const
*/
FileSystemSync.prototype.root;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystemSync-requestFileSystemSync-FileSystemSync-unsigned-short-type-unsigned-long-long-size
* @param {number} type
* @param {number} size
* @return {!FileSystemSync}
*/
function requestFileSystemSync(type, size) {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystemSync-requestFileSystemSync-FileSystemSync-unsigned-short-type-unsigned-long-long-size
* @param {number} type
* @param {number} size
* @return {!FileSystemSync}
*/
function webkitRequestFileSystemSync(type, size) {}
/**
* @see http://www.w3.org/TR/file-system-api/#the-entrysync-interface
* @constructor
*/
function EntrySync() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-isFile
* @type {boolean}
* @const
*/
EntrySync.prototype.isFile;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-isDirectory
* @type {boolean}
* @const
*/
EntrySync.prototype.isDirectory;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-name
* @type {string}
* @const
*/
EntrySync.prototype.name;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-fullPath
* @type {string}
* @const
*/
EntrySync.prototype.fullPath;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-filesystem
* @type {!FileSystemSync}
* @const
*/
EntrySync.prototype.filesystem;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-moveTo
* @param {!DirectoryEntrySync} parent
* @param {string=} newName
* @return {!EntrySync}
*/
EntrySync.prototype.moveTo = function(parent, newName) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-copyTo
* @param {!DirectoryEntrySync} parent
* @param {string=} newName
* @return {!EntrySync}
*/
EntrySync.prototype.copyTo = function(parent, newName) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-toURL
* @param {string=} mimeType
* @return {string}
*/
EntrySync.prototype.toURL = function(mimeType) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-remove
*/
EntrySync.prototype.remove = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-getMetadata
* @return {!Metadata}
*/
EntrySync.prototype.getMetadata = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-EntrySync-getParent
* @return {!DirectoryEntrySync}
*/
EntrySync.prototype.getParent = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-directoryentrysync-interface
* @constructor
* @extends {EntrySync}
*/
function DirectoryEntrySync() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntrySync-createReader
* @return {!DirectoryReaderSync}
*/
DirectoryEntrySync.prototype.createReader = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntrySync-getFile
* @param {string} path
* @param {Object=} options
* @return {!FileEntrySync}
*/
DirectoryEntrySync.prototype.getFile = function(path, options) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntrySync-getDirectory
* @param {string} path
* @param {Object=} options
* @return {!DirectoryEntrySync}
*/
DirectoryEntrySync.prototype.getDirectory = function(path, options) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntrySync-removeRecursively
*/
DirectoryEntrySync.prototype.removeRecursively = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-directoryreadersync-interface
* @constructor
*/
function DirectoryReaderSync() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryReaderSync-readEntries
* @return {!Array.<!EntrySync>}
*/
DirectoryReaderSync.prototype.readEntries = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-fileentrysync-interface
* @constructor
* @extends {EntrySync}
*/
function FileEntrySync() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileEntrySync-createWriter
* @return {!FileWriterSync}
*/
FileEntrySync.prototype.createWriter = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileEntrySync-file
* @return {!File}
*/
FileEntrySync.prototype.file = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-fileexception-exception
* @constructor
*/
function FileException() {}
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-NOT_FOUND_ERR
* @type {number}
*/
FileException.prototype.NOT_FOUND_ERR = 1;
/** @type {number} */
FileException.NOT_FOUND_ERR = 1;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-SECURITY_ERR
* @type {number}
*/
FileException.prototype.SECURITY_ERR = 2;
/** @type {number} */
FileException.SECURITY_ERR = 2;
/**
* @see http://www.w3.org/TR/FileAPI/#widl-FileException-ABORT_ERR
* @type {number}
*/
FileException.prototype.ABORT_ERR = 3;
/** @type {number} */
FileException.ABORT_ERR = 3;
/**
* @see http://www.w3.org/TR/FileAPI/#widl-FileException-NOT_READABLE_ERR
* @type {number}
*/
FileException.prototype.NOT_READABLE_ERR = 4;
/** @type {number} */
FileException.NOT_READABLE_ERR = 4;
/**
* @see http://www.w3.org/TR/FileAPI/#widl-FileException-ENCODING_ERR
* @type {number}
*/
FileException.prototype.ENCODING_ERR = 5;
/** @type {number} */
FileException.ENCODING_ERR = 5;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileException-NO_MODIFICATION_ALLOWED_ERR
* @type {number}
*/
FileException.prototype.NO_MODIFICATION_ALLOWED_ERR = 6;
/** @type {number} */
FileException.NO_MODIFICATION_ALLOWED_ERR = 6;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileException-INVALID_STATE_ERR
* @type {number}
*/
FileException.prototype.INVALID_STATE_ERR = 7;
/** @type {number} */
FileException.INVALID_STATE_ERR = 7;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileException-SYNTAX_ERR
* @type {number}
*/
FileException.prototype.SYNTAX_ERR = 8;
/** @type {number} */
FileException.SYNTAX_ERR = 8;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-INVALID_MODIFICATION_ERR
* @type {number}
*/
FileException.prototype.INVALID_MODIFICATION_ERR = 9;
/** @type {number} */
FileException.INVALID_MODIFICATION_ERR = 9;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-QUOTA_EXCEEDED_ERR
* @type {number}
*/
FileException.prototype.QUOTA_EXCEEDED_ERR = 10;
/** @type {number} */
FileException.QUOTA_EXCEEDED_ERR = 10;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-TYPE_MISMATCH_ERR
* @type {number}
*/
FileException.prototype.TYPE_MISMATCH_ERR = 11;
/** @type {number} */
FileException.TYPE_MISMATCH_ERR = 11;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-PATH_EXISTS_ERR
* @type {number}
*/
FileException.prototype.PATH_EXISTS_ERR = 12;
/** @type {number} */
FileException.PATH_EXISTS_ERR = 12;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-code-exception
* @type {number}
*/
FileException.prototype.code;

View File

@ -0,0 +1,24 @@
/*
* Copyright 2012 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the fullscreen API specification of HTML5.
* @see http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html
*
* @externs
*/
// TODO(nicksantos): Delete me.

View File

@ -0,0 +1,440 @@
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for the Google Analytics API.
* @see http://code.google.com/intl/en/apis/analytics/docs/gaJS/gaJSApi.html
* @externs
*/
var _gat = {};
/**
* @param {string=} opt_account
* @param {string=} opt_name
* @return {_ga_tracker}
*/
_gat._createTracker = function(opt_account, opt_name) {};
/**
* @param {string=} opt_name
* @return {_ga_tracker}
*/
_gat._getTrackerByName = function(opt_name) {};
/**
* @return {undefined}
*/
_gat._anonymizeIp = function() {};
var _gaq = {};
/**
* @see http://code.google.com/apis/analytics/docs/gaJS/gaJSApi_gaq.html#_gaq.push
* @param {...(function()|Array.<Object>)} commandArray
* @return {number}
*/
_gaq.push = function(commandArray) {};
/**
* @interface
*/
var _ga_tracker = function() {};
/**
* @param {string} newIgnoredOrganicKeyword
* @return {undefined}
*/
_ga_tracker.prototype._addIgnoredOrganic =
function(newIgnoredOrganicKeyword) {};
/**
* @param {string} newIgnoredReferrer
* @return {undefined}
*/
_ga_tracker.prototype._addIgnoredRef = function(newIgnoredReferrer) {};
/**
* @param {string} orderId
* @param {string} sku
* @param {string} name
* @param {string} category
* @param {string} price
* @param {string} quantity
* @return {undefined}
*/
_ga_tracker.prototype._addItem = function(orderId, sku, name, category, price,
quantity) {};
/**
* @param {string} newOrganicEngine
* @param {string} newOrganicKeyword
* @param {boolean=} opt_prepend
* @return {undefined}
*/
_ga_tracker.prototype._addOrganic = function(newOrganicEngine,
newOrganicKeyword, opt_prepend) {};
/**
* The docs here (http://goo.gl/HUdY) say that the return type is
* `_gat.GA_EComm_.Transactions_`, but that type is never defined.
* @param {string} orderId
* @param {string} affiliation
* @param {string} total
* @param {string=} opt_tax
* @param {string=} opt_shipping
* @param {string=} opt_city
* @param {string=} opt_state
* @param {string=} opt_country
* @return {Object}
*/
_ga_tracker.prototype._addTrans = function(orderId, affiliation, total,
opt_tax, opt_shipping, opt_city, opt_state, opt_country) {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._clearIgnoredOrganic = function() {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._clearIgnoredRef = function() {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._clearOrganic = function() {};
/**
* @param {string} newPath
* @return {undefined}
*/
_ga_tracker.prototype._cookiePathCopy = function(newPath) {};
/**
* @param {number} index
* @return {undefined}
*/
_ga_tracker.prototype._deleteCustomVar = function(index) {};
/**
* @return {string}
*/
_ga_tracker.prototype._getName = function() {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._setAccount = function() {};
/**
* @return {string}
*/
_ga_tracker.prototype._getAccount = function() {};
/**
* @return {boolean}
*/
_ga_tracker.prototype._getClientInfo = function() {};
/**
* @return {boolean}
*/
_ga_tracker.prototype._getDetectFlash = function() {};
/**
* @return {boolean}
*/
_ga_tracker.prototype._getDetectTitle = function() {};
/**
* @param {string} targetUrl
* @param {boolean=} opt_useHash
* @return {string}
*/
_ga_tracker.prototype._getLinkerUrl = function(targetUrl, opt_useHash) {};
/**
* @return {string}
*/
_ga_tracker.prototype._getLocalGifPath = function() {};
/**
* @return {number}
*/
_ga_tracker.prototype._getServiceMode = function() {};
/**
* @return {string}
*/
_ga_tracker.prototype._getVersion = function() {};
/**
* @param {number} index
* @return {string|undefined}
*/
_ga_tracker.prototype._getVisitorCustomVar = function(index) {};
// docs wrong
/**
* @param {string} targetUrl
* @param {boolean=} opt_useHash
* @return {undefined}
*/
_ga_tracker.prototype._link = function(targetUrl, opt_useHash) {};
// docs wrong
/**
* @param {HTMLFormElement} formObject
* @param {boolean=} opt_useHash
* @return {undefined}
*/
_ga_tracker.prototype._linkByPost = function(formObject, opt_useHash) {};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setAllowAnchor = function(enable) {};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setAllowHash = function(enable) {};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setAllowLinker = function(enable) {};
/**
* @param {string} newCampContentKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampContentKey = function(newCampContentKey) {};
/**
* @param {string} newCampMedKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampMediumKey = function(newCampMedKey) {};
/**
* @param {string} newCampNameKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampNameKey = function(newCampNameKey) {};
/**
* @param {string} newCampNOKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampNOKey = function(newCampNOKey) {};
/**
* @param {string} newCampSrcKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampSourceKey = function(newCampSrcKey) {};
/**
* @param {string} newCampTermKey
* @return {undefined}
*/
_ga_tracker.prototype._setCampTermKey = function(newCampTermKey) {};
/**
* @param {number} cookieTimeoutMillis
* @return {undefined}
*/
_ga_tracker.prototype._setCampaignCookieTimeout = function(cookieTimeoutMillis)
{};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setCampaignTrack = function(enable) {};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setClientInfo = function(enable) {};
/**
* @param {string} newCookiePath
* @return {undefined}
*/
_ga_tracker.prototype._setCookiePath = function(newCookiePath) {};
/**
* @param {number} index
* @param {string} name
* @param {string} value
* @param {number=} opt_scope
* @return {boolean}
*/
_ga_tracker.prototype._setCustomVar = function(index, name, value, opt_scope)
{};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setDetectFlash = function(enable) {};
/**
* @param {boolean} enable
* @return {undefined}
*/
_ga_tracker.prototype._setDetectTitle = function(enable) {};
/**
* @param {string} newDomainName
* @return {undefined}
*/
_ga_tracker.prototype._setDomainName = function(newDomainName) {};
/**
* @param {string} newLocalGifPath
* @return {undefined}
*/
_ga_tracker.prototype._setLocalGifPath = function(newLocalGifPath) {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._setLocalRemoteServerMode = function() {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._setLocalServerMode = function() {};
/**
* @param {string} newReferrerUrl
* @return {undefined}
*/
_ga_tracker.prototype._setReferrerOverride = function(newReferrerUrl) {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._setRemoteServerMode = function() {};
/**
* @param {string} newRate
* @return {undefined}
*/
_ga_tracker.prototype._setSampleRate = function(newRate) {};
/**
* @param {number} cookieTimeoutMillis
* @return {undefined}
*/
_ga_tracker.prototype._setSessionCookieTimeout = function(cookieTimeoutMillis)
{};
/**
* @param {number} cookieTimeoutMillis
* @return {undefined}
*/
_ga_tracker.prototype._setVisitorCookieTimeout = function(cookieTimeoutMillis)
{};
/**
* @param {string} category
* @param {string} action
* @param {string=} opt_label
* @param {number=} opt_value
* @param {boolean=} opt_noninteraction
* @return {undefined}
*/
_ga_tracker.prototype._trackEvent = function(category, action, opt_label,
opt_value, opt_noninteraction) {};
/**
* @param {string=} opt_pageUrl
* @return {undefined}
*/
_ga_tracker.prototype._trackPageview = function(opt_pageUrl) {};
/**
* @return {undefined}
*/
_ga_tracker.prototype._trackTrans = function() {};
/* deprecated methods below */
/**
* @param {string} account
* @return {_ga_tracker}
* @deprecated
*/
_gat._getTracker = function(account) {};
/**
* @param {string} accountId
* @param {string=} opt_name
* @return {_ga_tracker}
* @deprecated
*/
_gaq._createAsyncTracker = function(accountId, opt_name) {};
/**
* @param {string=} opt_name
* @return {_ga_tracker}
* @deprecated
*/
_gaq._getAsyncTracker = function(opt_name) {};
/**
* @return {undefined}
* @deprecated
*/
_ga_tracker.prototype._initData = function() {};
/**
* @param {number} milliseconds
* @return {undefined}
* @deprecated
*/
_ga_tracker.prototype._setCookiePersistence = function(milliseconds) {};
/**
* @param {number} newDefaultTimeout
* @return {undefined}
* @deprecated
*/
_ga_tracker.prototype._setCookieTimeout = function(newDefaultTimeout) {};
/**
* @param {number} newTimeout
* @return {undefined}
* @deprecated
*/
_ga_tracker.prototype._setSessionTimeout = function(newTimeout) {};
/**
* @param {string} newVal
* @return {undefined}
* @deprecated
*/
_ga_tracker.prototype._setVar = function(newVal) {};

View File

@ -0,0 +1,55 @@
/*
* Copyright 2010 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for the Google Loader API.
* @see http://code.google.com/apis/ajax/documentation/
* @externs
*/
/** @param {function()} callback */
google.setOnLoadCallback = function(callback) {};
/**
* @param {string} moduleName
* @param {string} moduleVersion
* @param {Object.<string,*>=} optionalSettings
*/
google.load = function(moduleName, moduleVersion, optionalSettings) {};
google.loader = {};
google.loader.ClientLocation = {};
/** @type {number} */
google.loader.ClientLocation.latitude;
/** @type {number} */
google.loader.ClientLocation.longitude;
google.loader.ClientLocation.address = {};
/** @type {string} */
google.loader.ClientLocation.address.city;
/** @type {string} */
google.loader.ClientLocation.address.country;
/** @type {string} */
google.loader.ClientLocation.address.country_code;
/** @type {string} */
google.loader.ClientLocation.address.region;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,240 @@
/*
* Copyright 2011 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for YouTube Player API for <iframe> Embeds
* @see http://code.google.com/apis/youtube/iframe_api_reference.html
* @externs
*/
/** @return {undefined} */
var onYouTubePlayerAPIReady = function() {};
/** @return {undefined} */
window.onYouTubePlayerAPIReady = function() {};
/** @const */
var YT = {};
/**
* @constructor
* @param {(string|Element)} container
* @param {Object.<string, *>} opts
*/
YT.Player = function(container, opts) {};
/**
* @param {string} videoId
* @param {number=} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.cueVideoById =
function(videoId, startSeconds, suggestedQuality) {};
/**
* @param {string} videoId
* @param {number=} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.loadVideoById =
function(videoId, startSeconds, suggestedQuality) {};
/**
* @param {string} mediaContentUrl
* @param {number} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.cueVideoByUrl =
function(mediaContentUrl, startSeconds, suggestedQuality) {};
/**
* @param {string} mediaContentUrl
* @param {number} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.loadVideoByUrl =
function(mediaContentUrl, startSeconds, suggestedQuality) {};
/**
* @param {(String|Array.<String>)} playlist
* @param {number=} index
* @param {number=} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.cuePlaylist =
function(playlist, index, startSeconds, suggestedQuality) {};
/**
* @param {(String|Array.<String>)} playlist
* @param {number=} index
* @param {number=} startSeconds
* @param {string=} suggestedQuality
*/
YT.Player.prototype.loadPlaylist =
function(playlist, index, startSeconds, suggestedQuality) {};
/** @return {undefined} */
YT.Player.prototype.playVideo = function() {};
/** @return {undefined} */
YT.Player.prototype.pauseVideo = function() {};
/** @return {undefined} */
YT.Player.prototype.stopVideo = function() {};
/**
* @param {number} seconds
* @param {boolean} allowSeekAhead
*/
YT.Player.prototype.seekTo = function(seconds, allowSeekAhead) {};
/** @return {undefined} */
YT.Player.prototype.clearVideo = function() {};
/** @return {undefined} */
YT.Player.prototype.nextVideo = function() {};
/** @return {undefined} */
YT.Player.prototype.previousVideo = function() {};
/** @param {number} index */
YT.Player.prototype.playVideoAt = function(index) {};
/** @return {undefined} */
YT.Player.prototype.mute = function() {};
/** @return {undefined} */
YT.Player.prototype.unMute = function() {};
/** @return {boolean} */
YT.Player.prototype.isMuted = function() {};
/** @param {number} volume */
YT.Player.prototype.setVolume = function(volume) {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getVolume = function() {};
/** @param {boolean} loopPlaylists */
YT.Player.prototype.setLoop = function(loopPlaylists) {};
/** @param {boolean} shufflePlaylist */
YT.Player.prototype.setShuffle = function(shufflePlaylist) {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getVideoBytesLoaded = function() {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getVideoBytesTotal = function() {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getVideoStartBytes = function() {};
/**
* @return {YT.PlayerState|number}
* @nosideeffects
*/
YT.Player.prototype.getPlayerState = function() {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getCurrentTime = function() {};
/**
* @return {(undefined|string)}
* @nosideeffects
*/
YT.Player.prototype.getPlaybackQuality = function() {};
/** @param {string} suggestedQuality */
YT.Player.prototype.setPlaybackQuality = function(suggestedQuality) {};
/**
* @return {Array.<string>}
* @nosideeffects
*/
YT.Player.prototype.getAvailableQualityLevels = function() {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getDuration = function() {};
/**
* @return {string}
* @nosideeffects
*/
YT.Player.prototype.getVideoUrl = function() {};
/**
* @return {string}
* @nosideeffects
*/
YT.Player.prototype.getVideoEmbedCode = function() {};
/**
* @return {Array.<string>}
* @nosideeffects
*/
YT.Player.prototype.getPlaylist = function() {};
/**
* @return {number}
* @nosideeffects
*/
YT.Player.prototype.getPlaylistIndex = function() {};
/**
* @param {string} eventName
* @param {string} listenerName
*/
YT.Player.prototype.addEventListener = function(eventName, listenerName) {};
/** @enum */
YT.PlayerState = {
ENDED: 0,
PLAYING: 1,
PAUSED: 2,
BUFFERING: 3,
CUED: 4
};
/**
* @constructor
* @private
*/
YT.Event = function() {};
/** @type {string|number|undefined} */
YT.Event.prototype.data;
/** @type {YT.Player} */
YT.Event.prototype.target = null;

View File

@ -0,0 +1,714 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for jQuery 1.3.2.
* The externs defined here are in the order of the jQuery documentation pages.
* Note that some functions use different return types depending on the number
* of parameters passed in. In this cases, you may need to annotate the type
* of the result in your code, so the JSCompiler understands which type you're
* expecting. For example:
* <code>var elt = /** @type {Element} * / (foo.get(0));</code>
* @see http://docs.jquery.com/
*/
/**
* @param {string|Node|Element|Array.<Element>|Function|Window} arg
* @param {(jQueryObject|Document)=} opt_arg
* @return {jQueryObject}
*/
var $ = function(arg, opt_arg) {};
var jQuery = {};
/** @constructor */
function jQueryObject() {}
// http://docs.jquery.com/Core - Object accessors
/**
* @param {Function} callback
* @return {jQueryObject}
*/
jQueryObject.prototype.each = function(callback) {};
/** @return {number} */
jQueryObject.prototype.size = function() {};
/** @type {number} */
jQueryObject.prototype.length;
/** @return {string} */
jQueryObject.prototype.selector = function() {};
/** @return {Element} */
jQueryObject.prototype.context = function() {};
/**
* @param {number=} opt_index
* @return {Element|Array.<Element>}
*/
jQueryObject.prototype.get = function(opt_index) {};
/**
* @param {Element|jQueryObject} subject
* @return {number}
*/
jQueryObject.prototype.index = function(subject) {};
// http://docs.jquery.com/Core - Data
/**
* @param {string} name
* @param {string=} opt_value
* @return {*}
*/
jQueryObject.prototype.data = function(name, opt_value) {};
/**
* @param {string} name
* @return {jQueryObject}
*/
jQueryObject.prototype.removeData = function(name) {};
/**
* @param {(string|Function|Array.<Function>)=} opt_arg1
* @param {(Function|Array.<Function>)=} opt_arg2
* @return {Array.<Function>|jQueryObject}
*/
jQueryObject.prototype.queue = function(opt_arg1, opt_arg2) {};
/**
* @param {string=} opt_name
* @return {jQueryObject}
*/
jQueryObject.prototype.dequeue = function(opt_name) {};
// http://docs.jquery.com/Attributes - Attr
/**
* @param {string|Object} nameOrProperties
* @param {*=} opt_value
* @return {Object|jQueryObject}
*/
jQueryObject.prototype.attr = function(nameOrProperties, opt_value) {};
/**
* @param {string} name
* @return {jQueryObject}
*/
jQueryObject.prototype.removeAttr = function(name) {};
// http://docs.jquery.com/Attributes - Class
/**
* @param {string} klass
* @return {jQueryObject}
*/
jQueryObject.prototype.addClass = function(klass) {};
/**
* @param {string} klass
* @return {boolean}
*/
jQueryObject.prototype.hasClass = function(klass) {};
/**
* @param {string=} opt_klass
* @return {jQueryObject}
*/
jQueryObject.prototype.removeClass = function(opt_klass) {};
/**
* @param {string} klass
* @param {boolean=} opt_switch
* @return {jQueryObject}
*/
jQueryObject.prototype.toggleClass = function(klass, opt_switch) {};
// http://docs.jquery.com/Attributes - HTML, Text, Value
/**
* @param {string} opt_val
* @return {string|jQueryObject}
*/
jQueryObject.prototype.html = function(opt_val) {};
/**
* @param {string=} opt_val
* @return {string|jQueryObject}
*/
jQueryObject.prototype.text = function(opt_val) {};
/**
* @param {string|Array.<string>} opt_val
* @return {string|Array|jQueryObject}
*/
jQueryObject.prototype.val = function(opt_val) {};
// http://docs.jquery.com/Traversing - Filtering
/**
* @param {number} index
* @return {jQueryObject}
*/
jQueryObject.prototype.eq = function(index) {};
/**
* @param {string|Function} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.filter = function(arg) {};
/**
* @param {string} expr
* @return {boolean}
*/
jQueryObject.prototype.is = function(expr) {};
/**
* @param {Function} callback
* @return {jQueryObject}
*/
jQueryObject.prototype.map = function(callback) {};
/**
* @param {string} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.not = function(expr) {};
/**
* @param {number} start
* @param {number=} opt_end
* @return {jQueryObject}
*/
jQueryObject.prototype.slice = function(start, opt_end) {};
// http://docs.jquery.com/Traversing - Finding, Chaining
/**
* @param {string|Element|Array.<Element>} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.add = function(expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.children = function(opt_expr) {};
/**
* @param {string} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.closest = function(expr) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.contents = function() {};
/**
* @param {string} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.find = function(expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.next = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.nextAll = function(opt_expr) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.offsetParent = function() {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.parent = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.parents = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.prev = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.prevAll = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.siblings = function(opt_expr) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.andSelf = function() {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.end = function() {};
// http://docs.jquery.com/Manipulation
/**
* @param {...(string|Node|Element|jQueryObject)} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.append = function(var_args) {};
/**
* @param {string|Node|Element|jQueryObject} target
* @return {jQueryObject}
*/
jQueryObject.prototype.appendTo = function(target) {};
/**
* @param {...(string|Node|Element|jQueryObject)} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.prepend = function(var_args) {};
/**
* @param {string|Node|Element|jQueryObject} target
* @return {jQueryObject}
*/
jQueryObject.prototype.prependTo = function(target) {};
/**
* @param {...(string|Node|Element|jQueryObject)} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.after = function(var_args) {};
/**
* @param {...(string|Node|Element|jQueryObject)} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.before = function(var_args) {};
/**
* @param {string|Node|Element|jQueryObject} target
* @return {jQueryObject}
*/
jQueryObject.prototype.insertAfter = function(target) {};
/**
* @param {string|Node|Element|jQueryObject} target
* @return {jQueryObject}
*/
jQueryObject.prototype.insertBefore = function(target) {};
/**
* @param {string|Element} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrap = function(arg) {};
/**
* @param {string|Element} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrapAll = function(arg) {};
/**
* @param {string|Element} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrapInner = function(arg) {};
/**
* @param {string|Node|Element|jQueryObject} content
* @return {jQueryObject}
*/
jQueryObject.prototype.replaceWith = function(content) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.replaceAll = function(selector) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.empty = function() {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.remove = function(opt_expr) {};
/**
* @param {boolean=} opt_cloneEvents
* @return {jQueryObject}
*/
jQueryObject.prototype.clone = function(opt_cloneEvents) {};
// http://docs.jquery.com/CSS
/**
* @param {string|Object} nameOrProperties
* @param {(string|number|Function)=} opt_value
* @return {Object|jQueryObject|string}
*/
jQueryObject.prototype.css = function(nameOrProperties, opt_value) {};
/**
* @return {Object}
*/
jQueryObject.prototype.offset = function() {};
/**
* @return {Object}
*/
jQueryObject.prototype.position = function() {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.scrollTop = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.scrollLeft = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.height = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.width = function(opt_val) {};
/**
* @return {number}
*/
jQueryObject.prototype.innerHeight = function() {};
/**
* @return {number}
*/
jQueryObject.prototype.innerWidth = function() {};
/**
* @param {boolean=} opt_margin
* @return {number}
*/
jQueryObject.prototype.outerHeight = function(opt_margin) {};
/**
* @param {boolean=} opt_margin
* @return {number}
*/
jQueryObject.prototype.outerWidth = function(opt_margin) {};
// http://docs.jquery.com/Events
/**
* @param {string} type
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.live = function(type, fn) {};
/**
* @param {string=} opt_type
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.die = function(opt_type, opt_fn) {};
/**
* @param {Function} over
* @param {Function} out
* @return {jQueryObject}
*/
jQueryObject.prototype.hover = function(over, out) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.blur = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.change = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.click = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.dblclick = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.error = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.focus = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keydown = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keypress = function(opt_fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keyup = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.load = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mousedown = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseenter = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseleave = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mousemove = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseout = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseover = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseup = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.resize = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.scroll = function(fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.select = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.submit = function(opt_fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.unload = function(fn) {};
// http://docs.jquery.com/Effects
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.show = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.hide = function(opt_speed, opt_fn) {};
/**
* toggle() is defined as both an event and an effect... sigh.
* @param {(Function|boolean|number|string)=} opt_arg1
* @param {Function=} opt_fn2
* @param {...Function} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.toggle = function(opt_arg1, opt_fn2, var_args) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideDown = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideUp = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideToggle = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeIn = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeOut = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {number=} opt_opacity
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeTo = function(opt_speed, opt_opacity, opt_fn) {};
/**
* @param {Object} params
* @param {(number|string|Object)=} opt_durationOrOptions
* @param {string=} opt_easing
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.animate = function(
params, opt_durationOrOptions, opt_easing, opt_fn) {};
/**
* @param {boolean} opt_clearQueue
* @param {boolean} opt_gotoEnd
* @return {jQueryObject}
*/
jQueryObject.prototype.stop = function(opt_clearQueue, opt_gotoEnd) {};
jQuery.fx = {};
/** @type {boolean} */
jQuery.fx.off;
// http://docs.jquery.com/Utilities
/**
* @param {number|string|Object} value
* @param {Array} array
* @return {number}
*/
jQueryObject.prototype.inArray = function(value, array) {};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the JSON specification.
* @see http://www.json.org/json2.js.
* @externs
*/
// This cannot go into the COMMON externs because it conflicts with the pure
// JavaScript implementations of the API.
var JSON = {};
/**
* @param {string} jsonStr The string to parse.
* @param {(function(string, *) : *)=} opt_reviver
* @return {*} The JSON object.
* @throws {Error}
* @nosideeffects
*/
JSON.parse = function(jsonStr, opt_reviver) {};
/**
* @param {*} jsonObj Input object.
* @param {(Array.<string>|(function(string, *) : *)|null)=} opt_replacer
* @param {(number|string)=} opt_space
* @return {string} JSON string which represents jsonObj.
* @throws {Error}
* @nosideeffects
*/
JSON.stringify = function(jsonObj, opt_replacer, opt_space) {};

View File

@ -0,0 +1,100 @@
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the Media Source Extensions.
* @see http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
*
* @externs
*/
/**
* @constructor
* @implements {EventTarget}
*/
function MediaSource() {}
/** @override */
MediaSource.prototype.addEventListener = function(
type, listener, useCapture) {};
/** @override */
MediaSource.prototype.removeEventListener = function(
type, listener, useCapture) {};
/** @override */
MediaSource.prototype.dispatchEvent = function(evt) {};
/** @type {Array} */
MediaSource.prototype.sourceBuffers;
/** @type {Array} */
MediaSource.prototype.activeSourceBuffers;
/** @type {number} */
MediaSource.prototype.duration;
/**
* @param {string} type
* @return {SourceBuffer}
*/
MediaSource.prototype.addSourceBuffer = function(type) {};
/**
* @param {SourceBuffer} sourceBuffer
*/
MediaSource.prototype.removeSourceBuffer = function(sourceBuffer) {};
/** @type {string} */
MediaSource.prototype.readyState;
/**
* @param {string=} opt_error
*/
MediaSource.prototype.endOfStream = function(opt_error) {};
/**
* @constructor
* @implements {EventTarget}
*/
function SourceBuffer() {}
/** @override */
SourceBuffer.prototype.addEventListener = function(
type, listener, useCapture) {};
/** @override */
SourceBuffer.prototype.removeEventListener = function(
type, listener, useCapture) {};
/** @override */
SourceBuffer.prototype.dispatchEvent = function(evt) {};
/** @type {TimeRanges} */
SourceBuffer.prototype.buffered;
/** @type {number} */
SourceBuffer.prototype.timestampOffset;
/**
* @param {Uint8Array} data
*/
SourceBuffer.prototype.append = function(data) {};
/**
* Abort the current segment append sequence.
*/
SourceBuffer.prototype.abort = function() {};

View File

@ -0,0 +1,154 @@
/*
* Copyright 2010 The Closure Library Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs needed for Silverlight.
* @externs
* @author nicksantos@google.com (Nick Santos)
*/
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/bb980101(v=VS.95).aspx
*/
function SilverlightPlugin() {}
SilverlightPlugin.prototype.createFromXaml;
SilverlightPlugin.prototype.createFromXamlDownloader;
SilverlightPlugin.prototype.createObject;
SilverlightPlugin.prototype.findName;
SilverlightPlugin.prototype.getSystemGlyphTypefaces;
SilverlightPlugin.prototype.isVersionSupported;
SilverlightPlugin.prototype.accessibility;
SilverlightPlugin.prototype.actualHeight;
SilverlightPlugin.prototype.actualWidth;
SilverlightPlugin.prototype.background;
SilverlightPlugin.prototype.enableAutoZoom;
SilverlightPlugin.prototype.enableFramerateCounter;
SilverlightPlugin.prototype.enableHtmlAccess;
SilverlightPlugin.prototype.enableRedrawRegions;
/** @deprecated */
SilverlightPlugin.prototype.framerate;
SilverlightPlugin.prototype.fullScreen;
/** @deprecated */
SilverlightPlugin.prototype.ignoreBrowserVer;
SilverlightPlugin.prototype.initParams;
/** @deprecated */
SilverlightPlugin.prototype.inplaceInstallPrompt;
SilverlightPlugin.prototype.isLoaded;
/** @deprecated */
SilverlightPlugin.prototype.isWindowless;
SilverlightPlugin.prototype.maxFramerate;
SilverlightPlugin.prototype.root;
SilverlightPlugin.prototype.source;
SilverlightPlugin.prototype.windowless;
SilverlightPlugin.prototype.onerror;
SilverlightPlugin.prototype.onfullscreenchanged;
SilverlightPlugin.prototype.onload;
SilverlightPlugin.prototype.onresize;
SilverlightPlugin.prototype.onzoom;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/bb980127(v=VS.95).aspx
*/
function SilverlightDependencyObject() {}
SilverlightErrorEventArgs.prototype.findName;
/** @return {SilverlightPlugin} */
SilverlightErrorEventArgs.prototype.getHost;
/**
* @constructor
* @extends {SilverlightDependencyObject}
* @see http://msdn.microsoft.com/en-us/library/bb979960(v=VS.95).aspx
*/
function SilverlightErrorEventArgs() {}
SilverlightErrorEventArgs.prototype.equals;
SilverlightErrorEventArgs.prototype.getValue;
SilverlightErrorEventArgs.prototype.setValue;
SilverlightErrorEventArgs.prototype.errorCode;
SilverlightErrorEventArgs.prototype.errorMessage;
SilverlightErrorEventArgs.prototype.errorType;
SilverlightErrorEventArgs.prototype.name;
/**
* @constructor
* @extends {SilverlightErrorEventArgs}
* @see http://msdn.microsoft.com/en-us/library/bb979960(v=VS.95).aspx
*/
function SilverlightRuntimeErrorEventArgs() {}
SilverlightRuntimeErrorEventArgs.prototype.charPosition;
SilverlightRuntimeErrorEventArgs.prototype.lineNumber;
SilverlightRuntimeErrorEventArgs.prototype.methodName;
/**
* @constructor
* @extends {SilverlightErrorEventArgs}
* @see http://msdn.microsoft.com/en-us/library/bb980114(v=VS.95).aspx
*/
function SilverlightParserErrorEventArgs() {}
SilverlightParserErrorEventArgs.prototype.charPosition;
SilverlightParserErrorEventArgs.prototype.lineNumber;
SilverlightParserErrorEventArgs.prototype.xamlFile;
SilverlightParserErrorEventArgs.prototype.xmlAttribute;
SilverlightParserErrorEventArgs.prototype.xmlElement;

View File

@ -0,0 +1,654 @@
/*
* Copyright 2012 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for Underscore 1.3.1
*
* TODO: Wrapper objects.
* TODO: _.bind - for some reason this plays up in practice.
*
* @see http://documentcloud.github.com/underscore/
* @externs
*/
/**
* @param {Object} obj
* @return {!_}
* @constructor
*/
function _(obj) {};
// Collection functions
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
*/
_.each = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
*/
_.forEach = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.map = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.collect = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {*} memo
* @param {Object=} opt_context
* @return {!*}
*/
_.reduce = function(obj, iterator, memo, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {*} memo
* @param {Object=} opt_context
* @return {!*}
*/
_.inject = function(obj, iterator, memo, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {*} memo
* @param {Object=} opt_context
* @return {!*}
*/
_.foldl = function(obj, iterator, memo, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {*} memo
* @param {Object=} opt_context
* @return {!*}
*/
_.reduceRight = function(obj, iterator, memo, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {*} memo
* @param {Object=} opt_context
* @return {!*}
*/
_.foldr = function(obj, iterator, memo, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!*}
*/
_.find = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!*}
*/
_.detect = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.filter = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.select = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.reject = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {boolean}
*/
_.every = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {boolean}
*/
_.all = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {boolean}
*/
_.some = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {boolean}
*/
_.any = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {*} target
* @return {boolean}
*/
_.include = function(obj, target) {};
/**
* @param {Object|Array} obj
* @param {*} target
* @return {boolean}
*/
_.contains = function(obj, target) {};
/**
* @param {Object|Array} obj
* @param {Function} method
* @param {...*} var_args
*/
_.invoke = function(obj, method, var_args) {};
/**
* @param {Array.<Object>} obj
* @param {string} key
* @return {!Array}
*/
_.pluck = function(obj, key) {};
/**
* @param {Object|Array} obj
* @param {Function} opt_iterator
* @param {Object=} opt_context
* @return {!*}
*/
_.max = function(obj, opt_iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {Function} opt_iterator
* @param {Object=} opt_context
* @return {!*}
*/
_.min = function(obj, opt_iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @return {!Array}
*/
_.shuffle = function(obj) {};
/**
* @param {Object|Array} obj
* @param {Function} iterator
* @param {Object=} opt_context
* @return {!Array}
*/
_.sortBy = function(obj, iterator, opt_context) {};
/**
* @param {Object|Array} obj
* @param {string|Function} iterator
* @return {!Array.<!Array>}
*/
_.groupBy = function(obj, iterator) {};
/**
* @param {Array} list
* @param {*} obj
* @param {Function} opt_iterator
* @return {!number}
*/
_.sortedIndex = function(list, obj, opt_iterator) {};
/**
* @param {*} iterable
* @return {!Array}
*/
_.toArray = function(iterable) {};
/**
* @param {Object|Array} obj
* @return {!Array}
*/
_.size = function(obj) {};
// Array functions
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!*}
*/
_.first = function(array, opt_n) {};
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!*}
*/
_.head = function(array, opt_n) {};
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!Array}
*/
_.initial = function(array, opt_n) {};
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!Array}
*/
_.last = function(array, opt_n) {};
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!*}
*/
_.rest = function(array, opt_n) {};
/**
* @param {Array} array
* @param {number=} opt_n
* @return {!*}
*/
_.tail = function(array, opt_n) {};
/**
* @param {Array} array
* @return {!Array}
*/
_.compact = function(array) {};
/**
* @param {Array} array
* @param {boolean=} opt_shallow
* @return {!Array}
*/
_.flatten = function(array, opt_shallow) {};
/**
* @param {Array} array
* @param {...*} var_args
* @return {!Array}
*/
_.without = function(array, var_args) {};
/**
* @param {Array} array
* @param {boolean=} opt_isSorted
* @param {Function} opt_iterator
* @return {!Array}
*/
_.uniq = function(array, opt_isSorted, opt_iterator) {};
/**
* @param {Array} array
* @param {boolean=} opt_isSorted
* @param {Function} opt_iterator
* @return {!Array}
*/
_.unique = function(array, opt_isSorted, opt_iterator) {};
/**
* @param {...Array} arrays
* @return {!Array}
*/
_.union = function(arrays) {};
/**
* @param {...Array} arrays
* @return {!Array}
*/
_.intersection = function(arrays) {};
/**
* @param {...Array} arrays
* @return {!Array}
*/
_.intersect = function(arrays) {};
/**
* @param {Array} array
* @param {...Array} arrays
* @return {!Array}
*/
_.difference = function(array, arrays) {};
/**
* @param {...Array} arrays
* @return {!Array}
*/
_.zip = function(arrays) {};
/**
* @param {Array} array
* @param {*} item
* @param {boolean=} opt_isSorted
* @return {!number}
*/
_.indexOf = function(array, item, opt_isSorted) {};
/**
* @param {Array} array
* @param {*} item
* @return {!number}
*/
_.lastIndexOf = function(array, item) {};
/**
* @param {number} start
* @param {number=} opt_stop
* @param {number=} opt_step
* @return {!Array.<number>}
*/
_.range = function(start, opt_stop, opt_step) {};
// Function (ahem) functions
/**
* @param {Object} obj
* @param {...string} methodNames
*/
_.bindAll = function(obj, methodNames) {};
/**
* @param {Function} func
* @param {Function=} opt_hasher
*/
_.memoize = function(func, opt_hasher) {};
/**
* @param {Function} func
* @param {number} wait
* @param {...*} var_args
*/
_.delay = function(func, wait, var_args) {};
/**
* @param {Function} func
*/
_.defer = function(func) {};
/**
* @param {Function} func
* @param {number} wait
*/
_.throttle = function(func, wait) {};
/**
* @param {Function} func
* @param {number} wait
*/
_.debounce = function(func, wait) {};
/**
* @param {Function} func
*/
_.once = function(func) {};
/**
* @param {Function} func
* @param {Function} wrapper
* @return {!Function}
*/
_.wrap = function(func, wrapper) {};
/**
* @param {...Function} funcs
* @return {!Function}
*/
_.compose = function(funcs) {};
/**
* @param {number} times
* @param {Function} func
*/
_.after = function(times, func) {};
// Object functions
/**
* @param {Object} obj
* @return {!Array.<string>}
*/
_.keys = function(obj) {};
/**
* @param {Object} obj
* @return {!Array}
*/
_.values = function(obj) {};
/**
* @param {Object} obj
* @return {!Array.<string>}
*/
_.functions = function(obj) {};
/**
* @param {Object} obj
* @return {!Array.<string>}
*/
_.methods = function(obj) {};
/**
* @param {Object} obj
* @param {...Object} objs
*/
_.extend = function(obj, objs) {};
/**
* @param {Object} obj
* @param {...Object} defs
*/
_.defaults = function(obj, defs) {};
/**
* @param {Object} obj
* @return {Object}
*/
_.clone = function(obj) {};
/**
* @param {Object} obj
* @param {Function} interceptor
* @return {Object} obj
*/
_.tap = function(obj, interceptor) {};
/**
* @param {Object} a
* @param {Object} b
* @return {boolean}
*/
_.isEqual = function(a, b) {};
/**
* @param {Object|Array|string} obj
* @return {boolean}
*/
_.isEmpty = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isElement = function(obj) {}
/**
* @param {*} obj
* @return {boolean}
*/
_.isArray = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isObject = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isArguments = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isFunction = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isString = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isNumber = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isNaN = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isBoolean = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isDate = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isRegExp = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isNull = function(obj) {};
/**
* @param {*} obj
* @return {boolean}
*/
_.isUndefined = function(obj) {};
/**
* @param {Object} obj
* @param {string} key
* @return {boolean}
*/
_.has = function(obj, key) {};
// Utility functions
/**
* @return {_}
*/
_.noConflict = function() {};
/**
* @param {*} value
* @return {*}
*/
_.identity = function(value) {};
/**
* @param {number} n
* @param {Function} iterator
* @param {Object=} opt_context
*/
_.times = function (n, iterator, opt_context) {};
/**
* @param {string} s
* @return {string}
*/
_.escape = function(s) {};
/**
* @param {Object} obj
*/
_.mixin = function(obj) {};
/**
* @param {string=} opt_prefix
* @return {number|string}
*/
_.uniqueId = function(opt_prefix) {};
/**
* @param {string} str
* @param {Object=} opt_data
*/
_.template = function(str, opt_data) {};

View File

@ -0,0 +1,700 @@
/*
* Copyright 2012 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the API related to audio.
* Definitions for the Web Audio API.
* This file is based on the W3C Working Draft 15 March 2012.
* @see http://www.w3.org/TR/webaudio/
*
* @externs
*/
/**
* @constructor
*/
var AudioContext = function() {};
/** @type {AudioDestinationNode} */
AudioContext.prototype.destination;
/** @type {number} */
AudioContext.prototype.sampleRate;
/** @type {number} */
AudioContext.prototype.currentTime;
/** @type {AudioListener} */
AudioContext.prototype.listener;
/**
* AudioContext.prototype.createBuffer() has 2 syntax:
* * Regular method:
* createBuffer = function(numberOfChannels, length, sampleRate) {};
*
* * ArrayBuffer method:
* createBuffer = function(buffer, mixToMono) {};
*
* @param {number|ArrayBuffer} a
* @param {number|boolean} b
* @param {number=} sampleRate
*/
AudioContext.prototype.createBuffer = function(a, b, sampleRate) {};
/**
* @param {ArrayBuffer} audioData
* @param {Function} successCallback
* @param {Function=} errorCallback
*/
AudioContext.prototype.decodeAudioData = function(audioData, successCallback,
errorCallback) {};
/**
* @return {AudioBufferSourceNode}
*/
AudioContext.prototype.createBufferSource = function() {};
/**
* @param {number} bufferSize
* @param {number} numberOfInputs
* @param {number} numberOfOuputs
* @return {JavaScriptAudioNode}
*/
AudioContext.prototype.createJavaScriptNode = function(bufferSize,
numberOfInputs, numberOfOuputs) {};
/**
* @return {RealtimeAnalyserNode}
*/
AudioContext.prototype.createAnalyser = function() {};
/**
* @return {AudioGainNode}
*/
AudioContext.prototype.createGainNode = function() {};
/**
* @param {number=} maxDelayTime
* @return {DelayNode}
*/
AudioContext.prototype.createDelayNode = function(maxDelayTime) {};
/**
* @return {BiquadFilterNode}
*/
AudioContext.prototype.createBiquadFilter = function() {};
/**
* @return {AudioPannerNode}
*/
AudioContext.prototype.createPanner = function() {};
/**
* @return {ConvolverNode}
*/
AudioContext.prototype.createConvolver = function() {};
/**
* @return {AudioChannelSplitter}
*/
AudioContext.prototype.createChannelSplitter = function() {};
/**
* @return {AudioChannelMerger}
*/
AudioContext.prototype.createChannelMerger = function() {};
/**
* @return {DynamicsCompressorNode}
*/
AudioContext.prototype.createDynamicsCompressor = function() {};
/**
* @param {HTMLMediaElement} mediaElement
* @return {MediaElementAudioSourceNode}
*/
AudioContext.prototype.createMediaElementSource = function(mediaElement) {};
/**
* @constructor
*/
var AudioNode = function() {};
/**
* @param {AudioNode} destination
* @param {number=} output
* @param {number=} input
*/
AudioNode.prototype.connect = function(destination, output, input) {};
/**
* @param {number=} output
*/
AudioNode.prototype.disconnect = function(output) {};
/** @type {AudioContext} */
AudioNode.prototype.context;
/** @type {number} */
AudioNode.prototype.numberOfInputs;
/** @type {number} */
AudioNode.prototype.numberOfOutputs;
/**
* @constructor
* @extends {AudioNode}
* @private
*/
var AudioSourceNode = function() {};
/**
* @constructor
* @extends {AudioNode}
* @private
*/
var AudioDestinationNode = function() {};
/** @type {number} */
AudioDestinationNode.prototype.numberOfChannels;
/**
* @constructor
* @private
*/
var AudioParam = function() {};
/** @type {number} */
AudioParam.prototype.value;
/** @type {number} */
AudioParam.prototype.maxValue;
/** @type {number} */
AudioParam.prototype.minValue;
/** @type {number} */
AudioParam.prototype.defaultValue;
/** @type {number} */
AudioParam.prototype.units;
/**
* @param {number} value
* @param {number} time
*/
AudioParam.prototype.setValueAtTime = function(value, time) {};
/**
* @param {number} value
* @param {number} time
*/
AudioParam.prototype.linearRampToValueAtTime = function(value, time) {};
/**
* @param {number} value
* @param {number} time
*/
AudioParam.prototype.exponentialRampToValueAtTime = function(value, time) {};
/**
* @param {number} targetValue
* @param {number} time
* @param {number} timeConstant
*/
AudioParam.prototype.setTargetValueAtTime = function(targetValue, time,
timeConstant) {};
/**
* @param {Float32Array} values
* @param {number} time
* @param {number} duration
*/
AudioParam.prototype.setValueCurveAtTime = function(values, time, duration) {};
/**
* @param {number} startTime
*/
AudioParam.prototype.cancelScheduledValues = function(startTime) {};
/**
* @constructor
* @extends {AudioParam}
*/
var AudioGain = function() {};
/**
* @constructor
* @extends {AudioNode}
*/
var AudioGainNode = function() {};
/** @type {AudioGain} */
AudioGainNode.prototype.gain;
/**
* @constructor
* @extends {AudioNode}
*/
var DelayNode = function() {};
/** @type {AudioParam} */
DelayNode.prototype.delayTime;
/**
* @constructor
*/
var AudioBuffer = function() {};
/** @type {AudioGain} */
AudioBuffer.prototype.gain;
/** @type {number} */
AudioBuffer.prototype.sampleRate;
/** @type {number} */
AudioBuffer.prototype.length;
/** @type {number} */
AudioBuffer.prototype.duration;
/** @type {number} */
AudioBuffer.prototype.numberOfChannels;
/**
* @param {number} channel
* @return {Float32Array}
*/
AudioBuffer.prototype.getChannelData = function(channel) {};
/**
* @constructor
* @extends {AudioSourceNode}
*/
var AudioBufferSourceNode = function() {};
/** @type {AudioBuffer} */
AudioBufferSourceNode.prototype.buffer;
/** @type {number} */
AudioBufferSourceNode.prototype.gain;
/** @type {AudioParam} */
AudioBufferSourceNode.prototype.playbackRate;
/** @type {boolean} */
AudioBufferSourceNode.prototype.loop;
/**
* @param {number} when
*/
AudioBufferSourceNode.prototype.noteOn = function(when) {};
/**
* @param {number} when
* @param {number} grainOffset
* @param {number} grainDuration
*/
AudioBufferSourceNode.prototype.noteGrainOn = function(when, grainOffset,
grainDuration) {};
/**
* @param {number} when
*/
AudioBufferSourceNode.prototype.noteOff = function(when) {};
/**
* @constructor
* @extends {AudioSourceNode}
*/
var MediaElementAudioSourceNode = function() {};
/**
* @constructor
* @extends {AudioNode}
*/
var JavaScriptAudioNode = function() {};
/** @type {EventListener} */
JavaScriptAudioNode.prototype.onaudioprocess;
/**
* @const
* @type {number}
*/
JavaScriptAudioNode.prototype.bufferSize;
/**
* @constructor
* @extends {Event}
* @private
*/
var AudioProcessingEvent = function() {};
/** @type {JavaScriptAudioNode} */
AudioProcessingEvent.prototype.node;
/** @type {number} */
AudioProcessingEvent.prototype.playbackTime;
/** @type {number} */
AudioProcessingEvent.prototype.inputBuffer;
/** @type {AudioBuffer} */
AudioProcessingEvent.prototype.outputBuffer;
/**
* @constructor
* @extends {AudioNode}
*/
var AudioPannerNode = function() {};
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.EQUALPOWER = 0;
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.HRTF = 1;
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.SOUNDFIELD = 2;
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.LINEAR_DISTANCE = 0;
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.INVERSE_DISTANCE = 1;
/**
* @const
* @type {number}
*/
AudioPannerNode.prototype.EXPONENTIAL_DISTANCE = 2;
/** @type {number} */
AudioPannerNode.prototype.panningModel;
/**
* @param {number} x
* @param {number} y
* @param {number} z
*/
AudioPannerNode.prototype.setPosition = function(x, y, z) {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
*/
AudioPannerNode.prototype.setOrientation = function(x, y, z) {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
*/
AudioPannerNode.prototype.setVelocity = function(x, y, z) {};
/** @type {number} */
AudioPannerNode.prototype.distanceModel;
/** @type {number} */
AudioPannerNode.prototype.refDistance;
/** @type {number} */
AudioPannerNode.prototype.maxDistance;
/** @type {number} */
AudioPannerNode.prototype.rolloffFactor;
/** @type {number} */
AudioPannerNode.prototype.coneInnerAngle;
/** @type {number} */
AudioPannerNode.prototype.coneOuterAngle;
/** @type {number} */
AudioPannerNode.prototype.coneOuterGain;
/** @type {AudioGain} */
AudioPannerNode.prototype.coneGain;
/** @type {AudioGain} */
AudioPannerNode.prototype.distanceGain;
/**
* @constructor
*/
var AudioListener = function() {};
/** @type {number} */
AudioListener.prototype.gain;
/** @type {number} */
AudioListener.prototype.dopplerFactor;
/** @type {number} */
AudioListener.prototype.speedOfSound;
/**
* @param {number} x
* @param {number} y
* @param {number} z
*/
AudioListener.prototype.setPosition = function(x, y, z) {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
* @param {number} xUp
* @param {number} yUp
* @param {number} zUp
*/
AudioListener.prototype.setOrientation = function(x, y, z, xUp, yUp, zUp) {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
*/
AudioListener.prototype.setVelocity = function(x, y, z) {};
/**
* @constructor
* @extends {AudioNode}
*/
var ConvolverNode = function() {};
/** @type {AudioBuffer} */
ConvolverNode.prototype.buffer;
/** @type {boolean} */
ConvolverNode.prototype.normalize;
/**
* @constructor
* @extends {AudioNode}
*/
var RealtimeAnalyserNode = function() {};
/**
* @param {Float32Array} array
*/
RealtimeAnalyserNode.prototype.getFloatFrequencyData = function(array) {};
/**
* @param {Uint8Array} array
*/
RealtimeAnalyserNode.prototype.getByteFrequencyData = function(array) {};
/**
* @param {Uint8Array} array
*/
RealtimeAnalyserNode.prototype.getByteTimeDomainData = function(array) {};
/** @type {number} */
RealtimeAnalyserNode.prototype.fftSize;
/** @type {number} */
RealtimeAnalyserNode.prototype.frequencyBinCount;
/** @type {number} */
RealtimeAnalyserNode.prototype.minDecibels;
/** @type {number} */
RealtimeAnalyserNode.prototype.maxDecibels;
/** @type {number} */
RealtimeAnalyserNode.prototype.smoothingTimeConstant;
/**
* @constructor
* @extends {AudioNode}
*/
var AudioChannelSplitter = function() {};
/**
* @constructor
* @extends {AudioNode}
*/
var AudioChannelMerger = function() {};
/**
* @constructor
* @extends {AudioNode}
*/
var DynamicsCompressorNode = function() {};
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.threshold;
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.knee;
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.ratio;
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.reduction;
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.attack;
/** @type {AudioParam} */
DynamicsCompressorNode.prototype.release;
/**
* @constructor
* @extends {AudioNode}
*/
var BiquadFilterNode = function() {};
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.LOWPASS = 0;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.HIGHPASS = 1;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.BANDPASS = 2;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.LOWSHELF = 3;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.HIGHSHELF = 4;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.PEAKING = 5;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.NOTCH = 6;
/**
* @const
* @type {number}
*/
BiquadFilterNode.prototype.ALLPASS = 7;
/** @type {number} */
BiquadFilterNode.prototype.type;
/** @type {AudioParam} */
BiquadFilterNode.prototype.frequency;
/** @type {AudioParam} */
BiquadFilterNode.prototype.Q;
/** @type {AudioParam} */
BiquadFilterNode.prototype.gain;
/**
* @param {Float32Array} frequencyHz
* @param {Float32Array} magResponse
* @param {Float32Array} phaseResponse
*/
BiquadFilterNode.prototype.getFrequencyResponse = function(frequencyHz,
magResponse, phaseResponse) {};
/**
* @constructor
* @extends {AudioNode}
*/
var WaveShaperNode = function() {};
/** @type {Float32Array} */
WaveShaperNode.prototype.curve;
/**
* Definitions for the Web Audio API with webkit prefix.
*/
/**
* @constructor
* @extends {AudioContext}
*/
var webkitAudioContext = function() {};
/**
* @constructor
* @extends {AudioPannerNode}
*/
var webkitAudioPannerNode = function() {};
/**
* Definitions for the Audio API as implemented in Firefox.
* Please note that this document describes a non-standard experimental API.
* This API is considered deprecated.
* @see https://developer.mozilla.org/en/DOM/HTMLAudioElement
*/
/**
* @param {string=} src
* @constructor
*/
var Audio = function(src) {};
/**
* @param {number} channels
* @param {number} rate
*/
Audio.prototype.mozSetup = function(channels, rate) {};
/**
* @param {Array|Float32Array} buffer
*/
Audio.prototype.mozWriteAudio = function(buffer) {};
/**
* @return {number}
*/
Audio.prototype.mozCurrentSampleOffset = function() {};

View File

@ -0,0 +1,86 @@
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's EventSource API.
* @see http://www.w3.org/TR/eventsource/
*
* @externs
*/
/**
* @constructor
* @implements {EventTarget}
* @param {string} url
* @param {Object=} opt_eventSourceInitDict
*/
function EventSource(url, opt_eventSourceInitDict) {}
/** @override */
EventSource.prototype.addEventListener = function(
type, listener, useCapture) {};
/** @override */
EventSource.prototype.removeEventListener = function(
type, listener, useCapture) {};
/** @override */
EventSource.prototype.dispatchEvent = function(evt) {};
/**
* @type {string}
* @const
*/
EventSource.prototype.url;
/** @type {boolean} */
EventSource.prototype.withCredentials;
/**
* @type {number}
* @const
*/
EventSource.prototype.CONNECTING = 0;
/**
* @type {number}
* @const
*/
EventSource.prototype.OPEN = 1;
/**
* @type {number}
* @const
*/
EventSource.prototype.CLOSED = 2;
/**
* @type {number}
* @const
*/
EventSource.prototype.readyState;
/** @type {?function(!Event)} */
EventSource.prototype.onopen = function(e) {};
/** @type {?function(!MessageEvent)} */
EventSource.prototype.onmessage = function(e) {};
/** @type {?function(!Event)} */
EventSource.prototype.onerror = function(e) {};
/** @type {function()} */
EventSource.prototype.close = function() {};

View File

@ -0,0 +1,252 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Speech Input 2010 draft API and the
* 2012 Web Speech draft API (in progress).
* 2010 Speech Input API:
* http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html
* 2012 Web Speech API:
* http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
* This file contains only those functions/properties that are actively
* used in the Voice Search experiment. Because the draft is under discussion
* and constantly evolving, this file does not attempt to stay in sync with it.
*
* @externs
*/
// W3C Speech Input API implemented in Chrome M12
/**
* @constructor
* @extends {UIEvent}
*/
function SpeechInputEvent() {}
/** @type {SpeechInputResultList} */
SpeechInputEvent.prototype.results;
/**
* @constructor
*/
function SpeechInputResultList() {}
/** @type {number} */
SpeechInputResultList.prototype.length;
/**
* @constructor
*/
function SpeechInputResult() {}
/** @type {string} */
SpeechInputResult.prototype.utterance;
/** @type {number} */
SpeechInputResult.prototype.confidence;
// HTMLInputElement
/** @type {boolean} */
HTMLInputElement.prototype.webkitspeech;
/** @type {?function (Event)} */
HTMLInputElement.prototype.onwebkitspeechchange;
// W3C Web Speech API implemented in Chrome M23
/**
* @constructor
*/
function webkitSpeechGrammar() {}
/** @type {string} */
webkitSpeechGrammar.prototype.src;
/** @type {number} */
webkitSpeechGrammar.prototype.weight;
/**
* @constructor
*/
function webkitSpeechGrammarList() {}
/** @type {number} */
webkitSpeechGrammarList.prototype.length;
/**
* @constructor
*/
function SpeechRecognitionAlternative() {}
/** @type {string} */
SpeechRecognitionAlternative.prototype.transcript;
/** @type {number} */
SpeechRecognitionAlternative.prototype.confidence;
/**
* @constructor
*/
function SpeechRecognitionResult() {}
/** @type {boolean} */
SpeechRecognitionResult.prototype.isFinal;
/** @type {number} */
SpeechRecognitionResult.prototype.length;
/** @type {Document} */
SpeechRecognitionResult.prototype.emma;
/** @type {function(number): SpeechRecognitionAlternative} */
SpeechRecognitionResult.prototype.item = function(index) {};
/**
* @constructor
*/
function SpeechRecognitionResultList() {}
/** @type {number} */
SpeechRecognitionResultList.prototype.length;
/** @type {function(number): SpeechRecognitionResult} */
SpeechRecognitionResultList.prototype.item = function(index) {};
/**
* @constructor
* @extends {Event}
*/
function webkitSpeechRecognitionEvent() {}
/** @type {SpeechRecognitionResult} */
webkitSpeechRecognitionEvent.prototype.results;
/** @type {number} */
webkitSpeechRecognitionEvent.prototype.resultIndex;
/** @type {SpeechRecognitionResultList} */
webkitSpeechRecognitionEvent.prototype.resultHistory;
/**
* @constructor
*/
function webkitSpeechRecognitionError() {}
/** @type {number} */
webkitSpeechRecognitionError.prototype.code;
/** @type {number} */
webkitSpeechRecognitionError.prototype.OTHER;
/** @type {number} */
webkitSpeechRecognitionError.prototype.NO_SPEECH;
/** @type {number} */
webkitSpeechRecognitionError.prototype.ABORTED;
/** @type {number} */
webkitSpeechRecognitionError.prototype.AUDIO_CAPTURE;
/** @type {number} */
webkitSpeechRecognitionError.prototype.NETWORK;
/** @type {number} */
webkitSpeechRecognitionError.prototype.NOT_ALLOWED;
/** @type {number} */
webkitSpeechRecognitionError.prototype.SERVICE_NOT_ALLOWED;
/** @type {number} */
webkitSpeechRecognitionError.prototype.BAD_GRAMMAR;
/** @type {number} */
webkitSpeechRecognitionError.prototype.LANGUAGE_NOT_SUPPORTED;
/** @type {string} */
webkitSpeechRecognitionError.prototype.message;
/**
* @constructor
*/
function webkitSpeechRecognition() {}
/** @type {webkitSpeechGrammarList} */
webkitSpeechRecognition.prototype.grammars;
/** @type {string} */
webkitSpeechRecognition.prototype.lang;
/** @type {boolean} */
webkitSpeechRecognition.prototype.continuous;
/** @type {boolean} */
webkitSpeechRecognition.prototype.interimResults;
/** @type {number} */
webkitSpeechRecognition.prototype.maxAlternatives;
/** @type {function(): undefined} */
webkitSpeechRecognition.prototype.start;
/** @type {function(): undefined} */
webkitSpeechRecognition.prototype.stop;
/** @type {function(): undefined} */
webkitSpeechRecognition.prototype.abort;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onaudiostart;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onsoundstart;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onspeechstart;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onaudioend;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onsoundend;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onspeechend;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onend;
/** @type {function(Event): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onstart;
/** @type {function(webkitSpeechRecognitionEvent): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onnomatch;
/** @type {function(webkitSpeechRecognitionEvent): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onresult;
/** @type {function(webkitSpeechRecognitionError): (boolean|undefined)} */
webkitSpeechRecognition.prototype.onerror;

View File

@ -0,0 +1,141 @@
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Web Intents specification.
*
* Created from
* http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
* and
* http://srcs.cc/w/Source/WebCore/Modules/intents/DOMWindowIntents.idl
* http://srcs.cc/w/Source/WebCore/Modules/intents/DeliveredIntent.idl
* http://srcs.cc/w/Source/WebCore/Modules/intents/Intent.idl
* http://srcs.cc/w/Source/WebCore/Modules/intents/IntentResultCallback.idl
* http://srcs.cc/w/Source/WebCore/Modules/intents/NavigatorIntents.idl
* http://srcs.cc/w/Source/WebCore/html/HTMLIntentElement.idl
*
* @externs
*/
/**
* @param {string} action
* @param {string} type
* @param {*=} opt_data
* @param {Array.<Transferable>=} opt_transferList
* @constructor
*/
function Intent(action, type, opt_data, opt_transferList) {}
/** @type {string} */
Intent.prototype.action;
/** @type {string} */
Intent.prototype.type;
/** @type {*} */
Intent.prototype.data;
/**
* @constructor
* @extends {Intent}
*/
function DeliveredIntent() {}
/** @type {Array.<MessagePort>} */
DeliveredIntent.prototype.ports;
/**
* @param {string} key
* @return {string}
* @nosideeffects
*/
DeliveredIntent.prototype.getExtra = function(key) {};
/**
* @param {*} result
*/
DeliveredIntent.prototype.postResult = function(result) {};
/**
* @param {*} result
*/
DeliveredIntent.prototype.postFailure = function(result) {};
/** @type {DeliveredIntent} */
Window.prototype.intent;
/**
* @param {Intent} intent
* @param {function(*) : void=} opt_successCallback
* @param {function(*) : void=} opt_failureCallback
*/
Navigator.prototype.startActivity =
function(intent, opt_successCallback, opt_failureCallback) {};
/**
* @constructor
* @extends {HTMLElement}
*/
function HTMLIntentElement() {}
/**
* @type {string}
*/
HTMLIntentElement.prototype.action;
/**
* @type {string}
*/
HTMLIntentElement.prototype.type;
/**
* @type {string}
*/
HTMLIntentElement.prototype.href;
/**
* @type {string}
*/
HTMLIntentElement.prototype.title;
/**
* @type {string}
*/
HTMLIntentElement.prototype.disposition;
// Variants of the above for the implementation inside WebKit, which is
// vendor-prefixed.
/** @type {DeliveredIntent} */
Window.prototype.webkitIntent;
/**
* @param {string} action
* @param {string} type
* @param {*=} opt_data
* @param {Array.<Transferable>=} opt_transferList
* @constructor
* @extends {Intent}
*/
function WebKitIntent(action, type, opt_data, opt_transferList) {}
/**
* @param {WebKitIntent} intent
* @param {function(*) : void=} opt_successCallback
* @param {function(*) : void=} opt_failureCallback
*/
Navigator.prototype.webkitStartActivity =
function(intent, opt_successCallback, opt_failureCallback) {};

View File

@ -0,0 +1,29 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for the Webkit console specification.
* @see http://trac.webkit.org/browser/trunk/WebCore/page/Console.idl
* @see http://trac.webkit.org/browser/trunk/WebCore/page/Console.cpp
* @externs
*/
// TODO(nicksantos): We should delete this file and put this in
// the common externs.
/** @type {Console} */
var console;

View File

@ -0,0 +1,373 @@
/*
* Copyright 2012 YouTube LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Public API calls.
* @link http://code.google.com/apis/youtube/js_api_reference.html
* @externs
*/
/**
* @constructor
* @extends {HTMLObjectElement}
*/
function YouTubePlayer() {}
/**
* Plays the currently cued/loaded video.
*
*/
YouTubePlayer.prototype.playVideo = function() {};
/**
* Pauses the currently playing video.
*/
YouTubePlayer.prototype.pauseVideo = function() {};
/**
* Stops the current video. This function also closes the NetStream object and cancels the loading of the video.
*/
YouTubePlayer.prototype.stopVideo = function() {};
/**
* Clears the video display. This function is useful if you want to clear the video remnant after calling stopVideo().
*/
YouTubePlayer.prototype.clearVideo = function() {};
/**
* @return {number} The number of bytes loaded for the current video.
*/
YouTubePlayer.prototype.getVideoBytesLoaded = function() {};
/**
* @return {number} The size in bytes of the currently loaded/playing video.
*/
YouTubePlayer.prototype.getVideoBytesTotal = function() {};
/**
* @return {number} The number of bytes the video file started loading from.
*/
YouTubePlayer.prototype.getVideoStartBytes = function() {};
/**
* @return {Array} The current playlist as an array of video IDs.
*/
YouTubePlayer.prototype.getPlaylist = function() {};
/**
* @return {number} The current index in the playlist or -1 when the player has
* no playlist.
*/
YouTubePlayer.prototype.getPlaylistIndex = function() {};
/**
* Calls an option method on the module
* @param {string} moduleId The module descriptor id.
* @param {string} option The option to call on the module.
* @param {*} object Arbitrary data to be sent to the module.
* @return {Object} Returns null if module or option doesn't exist.
*/
YouTubePlayer.prototype.setOption = function(moduleId, option, object) {};
/**
* Calls an option method on the module
* @param {string} moduleId The module descriptor id.
* @param {string} option The option to call on the module.
* @param {*} object Arbitrary data to be sent to the module.
* @return {Object} Returns null if module or option doesn't exist.
*/
YouTubePlayer.prototype.getOption = function(moduleId, option, object) {};
/**
* @return {?string} The current playlist's list id if there is a playlist and
* that playlist was loaded from a list id, otherwise returns null.
*/
YouTubePlayer.prototype.getPlaylistId = function() {};
/**
* Mutes the player.
*/
YouTubePlayer.prototype.mute = function() {};
/**
* Unmutes the player.
*/
YouTubePlayer.prototype.unMute = function() {};
/**
* @return {boolean} true if the player is muted, false if not.
*/
YouTubePlayer.prototype.isMuted = function() {};
/**
* @param {number} volume The volume, an integer between 0 and 100.
*/
YouTubePlayer.prototype.setVolume = function(volume) {};
/**
* @return {number} The player's current volume, an integer between 0 and 100.
*/
YouTubePlayer.prototype.getVolume = function() {};
/**
* Seeks to the specified time of the video in seconds.
* @param {number} seconds The offset to seek to.
* @param {boolean=} opt_allowSeekAhead If true the player will make a new
* server request if seconds is beyond the currently loaded video data.
*/
YouTubePlayer.prototype.seekTo = function(seconds, opt_allowSeekAhead) {};
/**
* @return {number} The state of the player. Possible values are unstarted
* (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
*/
YouTubePlayer.prototype.getPlayerState = function() {};
/**
* Returns the current playback rate setting of the player.
* @return {number} The current playback rate setting of the player.
*/
YouTubePlayer.prototype.getPlaybackRate = function() {};
/**
* Sets the playback rate for the player based on the rate suggested by the
* user. The actually applied rate is the closest supported rate that lies
* between 1.0 and the suggested rate (inclusive). 1.0 will always be one
* of the supported playback rates.
* @param {number} suggestedRate The playback rate suggested by the user.
*/
YouTubePlayer.prototype.setPlaybackRate = function(suggestedRate) {};
/**
* Gets an array of playback rates supported by the video player, sorted in
* ascending order. This array is guaranteed to have the entry 1.0.
* @return {Array.<number>} Playback rates supported by the player.
*/
YouTubePlayer.prototype.getAvailablePlaybackRates = function() {};
/**
* @return {string} The current quality the player has loaded or is playing.
*/
YouTubePlayer.prototype.getPlaybackQuality = function() {};
/**
* Sets the playback quality in the video player. If the quality is not the
* current playing quality, the player will load the new quality.
* @param {string} quality The video quality the player should load and play.
*/
YouTubePlayer.prototype.setPlaybackQuality = function(quality) {};
/**
* @return {Array} Array of available quality levels in order of decreasing quality.
*/
YouTubePlayer.prototype.getAvailableQualityLevels = function() {};
/**
* @return {number} The elapsed time in seconds since the video started playing.
*/
YouTubePlayer.prototype.getCurrentTime = function() {};
/**
* @return {number} The duration in seconds of the currently playing video.
*/
YouTubePlayer.prototype.getDuration = function() {};
/**
* @param {string} event The event to listen for.
* @param {string|EventListener|Function} listener The function to call
* when the event occurs.
*/
YouTubePlayer.prototype.addEventListener = function(event, listener) {};
/**
* @return {string} The YouTube.com URL for the currently loaded/playing video.
*/
YouTubePlayer.prototype.getVideoUrl = function() {};
/**
* @return {string} The embed code for the currently loaded/playing video.
*/
YouTubePlayer.prototype.getVideoEmbedCode = function() {};
/**
* Loads the specified video's thumbnail and prepares the player to play the
* video.
* @param {Object|string} videoIdOrObject YouTube Video ID or object.
* @param {number} opt_startSeconds The video will start from the keyframe
* nearest this time.
*/
YouTubePlayer.prototype.cueVideoById =
function(videoIdOrObject, opt_startSeconds) {};
/**
* Loads and plays the specified video.
* @param {Object|string} videoIdOrObject YouTube Video ID or object.
* @param {number} opt_startSeconds The video will start from the keyframe
* nearest this time.
*/
YouTubePlayer.prototype.loadVideoById =
function(videoIdOrObject, opt_startSeconds) {};
/**
* Loads the specified video's thumbnail and prepares the player to play the video.
* @param {string} mediaContentUrl YouTube player URL in the format
* http://www.youtube.com/v/VIDEO_ID.
* @param {number} opt_startSeconds The video will start from the keyframe nearest this time.
*/
YouTubePlayer.prototype.cueVideoByUrl = function(mediaContentUrl, opt_startSeconds) {};
/**
* Loads and plays the specified video.
* @param {string} mediaContentUrl YouTube player URL in the format
* http://www.youtube.com/v/VIDEO_ID.
* @param {number} opt_startSeconds The video will start from the keyframe nearest this time.
*/
YouTubePlayer.prototype.loadVideoByUrl = function(mediaContentUrl, opt_startSeconds) {};
/**
* Loads and plays a specified video in a playlist.
* @param {string|Array|Object} playlistOrObject An object containing all of the
* parameters. Otherwise, a string that is a playlist id (without
* the PL list prefix) or an array of video ids.
* @param {number=} opt_index The index to begin playback at.
* @param {number=} opt_startSeconds Float/integer that specifies the time
* from which the video should start playing.
* @param {string=} opt_suggestedQuality The suggested playback quality for
* the video.
*/
YouTubePlayer.prototype.cuePlaylist = function(playlistOrObject,
opt_index, opt_startSeconds, opt_suggestedQuality) {};
/**
* Loads and cues a specified video in a playlist.
* @param {string|Array|Object} playlistOrObject An object containing all of the
* parameters. Otherwise, a string that is a playlist id (without
* the PL list prefix) or an array of video ids.
* @param {number=} opt_index The index to begin playback at.
* @param {number=} opt_startSeconds Float/integer that specifies the time
* from which the video should start playing.
* @param {string=} opt_suggestedQuality The suggested playback quality for
* the video.
*/
YouTubePlayer.prototype.loadPlaylist = function(playlistOrObject,
opt_index, opt_startSeconds, opt_suggestedQuality) {};
/**
* Plays the next video in the playlist. At the end of the playlist, this will
* go to the first video when loop is enabled, otherwise it will be a noop.
*/
YouTubePlayer.prototype.nextVideo = function() {};
/**
* Plays the previous video in the playlist. At the front of the playlist, this
* will go to the last video when loop is enabled, otherwise it will be a noop.
*/
YouTubePlayer.prototype.previousVideo = function() {};
/**
* Plays a specific video in the playlist. If the provided index is not in the
* playlist, this will be a noop.
* @param {number} index The index of the video in the playlist to play.
*/
YouTubePlayer.prototype.playVideoAt = function(index) {};
/**
* Shuffle the playlist when setting shuffle to true, or return the playlist to
* the original order when setting to false.
* @param {boolean} shuffle If the playlist should shuffle.
*/
YouTubePlayer.prototype.setShuffle = function(shuffle) {};
/**
* @param {boolean} loop If the playlist should loop.
*/
YouTubePlayer.prototype.setLoop = function(loop) {};
/**
* Sets the size in pixels of the player. You should not have to use this
* method in JavaScript as the player will automatically resize when the
* containing elements in the embed code have their height and width
* properties modified.
* @param {number} width Player width.
* @param {number} height Player height.
*/
YouTubePlayer.prototype.setSize = function(width, height) {};
/**
* Destroys the player reference.
*/
YouTubePlayer.prototype.destroy = function() {};
/**
* On player ready callback.
*
* @param {string} playerapiid String identifier for a player.
*/
function onYouTubePlayerReady(playerapiid) {}
/**
* On player ready callback.
*
* @param {string} playerapiid String identifier for a player.
*/
Window.prototype.onYouTubePlayerReady = function(playerapiid) {};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,47 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview JavaScript Built-Ins that are not
* part of any specifications but are
* still needed in some project's build.
* @externs
*
*/
// Do we need an opera.js?
var opera;
Window.prototype.opera;
Window.prototype.opera.postError;
/** @constructor */ function XSLTProcessor() {}
/** @constructor */ function NodeFilter() {}
/**
* @param {*=} opt_text
* @param {*=} opt_value
* @param {*=} opt_defaultSelected
* @param {*=} opt_selected
* @constructor
* @extends {Element}
*/
function Option(opt_text, opt_value, opt_defaultSelected, opt_selected) {}
// The "methods" object is a place to hang arbitrary external
// properties. It is a throwback to pre-typed days, and should
// not be used for any new definitions; it exists only to bridge
// the gap between the old way and the new way.
var methods = {};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,231 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for ECMAScript 5.
* @see http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf
* @externs
*/
/**
* @param {Object} selfObj Specifies the object to which |this| should point
* when the function is run. If the value is null or undefined, it will
* default to the global object.
* @param {...*} var_args Additional arguments that are partially
* applied to fn.
* @return {!Function} A partially-applied form of the Function on which
* bind() was invoked as a method.
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
*/
Function.prototype.bind = function(selfObj, var_args) {};
/**
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/Trim
*/
String.prototype.trim = function() {};
/**
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimLeft
*/
String.prototype.trimLeft = function() {};
/**
* @return {string}
* @nosideeffects
* @see http://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/TrimRight
*/
String.prototype.trimRight = function() {};
/**
* A object property descriptor used by Object.create, Object.defineProperty,
* Object.defineProperties, Object.getOwnPropertyDescriptor.
*
* Note: not a real constructor.
* @constructor
*/
var ObjectPropertyDescriptor = function(){};
/** @type {*} */
ObjectPropertyDescriptor.prototype.value;
/** @type {(function():?)||undefined} */
ObjectPropertyDescriptor.prototype.get;
/** @type {(function(?):void)||undefined} */
ObjectPropertyDescriptor.prototype.set;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.writable;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.enumerable;
/** @type {boolean|undefined} */
ObjectPropertyDescriptor.prototype.configurable;
/**
* @param {Object} proto
* @param {Object=} opt_properties A map of ObjectPropertyDescriptors.
* @return {!Object}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create
*/
Object.create = function(proto, opt_properties) {};
/**
* @param {!Object} obj
* @param {string} prop
* @param {!Object} descriptor A ObjectPropertyDescriptor.
* @return {!Object}
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty
*/
Object.defineProperty = function(obj, prop, descriptor) {};
/**
* @param {!Object} obj
* @param {!Object} props A map of ObjectPropertyDescriptors.
* @return {!Object}
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperties
*/
Object.defineProperties = function(obj, props) {};
/**
* @param {!Object} obj
* @param {string} prop
* @return {Object.<ObjectPropertyDescriptor>}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor
*/
Object.getOwnPropertyDescriptor = function(obj, prop) {};
/**
* @param {!Object} obj
* @return {Array.<string>}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
*/
Object.keys = function(obj) {};
/**
* @param {!Object} obj
* @return {Array.<string>}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames
*/
Object.getOwnPropertyNames = function(obj) {};
/**
* @param {!Object} obj
* @return {Object}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/GetPrototypeOf
*/
Object.getPrototypeOf = function(obj) {};
/**
* @param {!T} obj
* @return {!T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/preventExtensions
*/
Object.preventExtensions = function(obj) {};
/**
* @param {!T} obj
* @return {!T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/seal
*/
Object.seal = function(obj) {};
/**
* @param {!T} obj
* @return {!T}
* @template T
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/freeze
*/
Object.freeze = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isExtensible
*/
Object.isExtensible = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isSealed
*/
Object.isSealed = function(obj) {};
/**
* @param {!Object} obj
* @return {boolean}
* @nosideeffects
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/isFrozen
*/
Object.isFrozen = function(obj) {};
/**
* As per ECMAScript 5, 15.12.3.
* @param {string=} opt_key The JSON key for this object.
* @return {*} The serializable representation of this object. Note that this
* need not be a string. See http://goo.gl/PEUvs.
*/
Object.prototype.toJSON = function(opt_key) {};
/**
* @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toISOString
* @return {string}
*/
Date.prototype.toISOString = function() {};
/**
* @param {*=} opt_ignoredKey
* @return {string}
* @override
*/
Date.prototype.toJSON = function(opt_ignoredKey) {};

View File

@ -0,0 +1,927 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for objects in the File API, File Writer API, and
* File System API. Details of the API are at:
* http://www.w3.org/TR/FileAPI/
* http://www.w3.org/TR/file-writer-api/
* http://www.w3.org/TR/file-system-api/
*
* @externs
* @author dbk@google.com (David Barrett-Kahn)
* @author mpd@google.com (Michael Davidson)
*/
/**
* @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
* @param {Array.<ArrayBufferView|Blob|string>=} opt_blobParts
* @param {Object=} opt_options
* @constructor
* @nosideeffects
*/
function Blob(opt_blobParts, opt_options) {}
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-size
* @type {number}
*/
Blob.prototype.size;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-type
* @type {string}
*/
Blob.prototype.type;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-slice
* @param {number} start
* @param {number} length
* @return {!Blob}
* @nosideeffects
*/
Blob.prototype.slice = function(start, length) {};
/**
* This replaces Blob.slice in Chrome since WebKit revision 84005.
* @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
* @param {number} start
* @param {number} end
* @return {!Blob}
* @nosideeffects
*/
Blob.prototype.webkitSlice = function(start, end) {};
/**
* This replaces Blob.slice in Firefox.
* @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
* @param {number} start
* @param {number} end
* @return {!Blob}
* @nosideeffects
*/
Blob.prototype.mozSlice = function(start, end) {};
/**
* @see http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
* @type {function(new:Blob, Array.<ArrayBufferView|Blob|string>=, Object=)}
*/
Window.prototype.Blob;
/**
* @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
* @constructor
*/
function BlobBuilder() {}
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2
* @param {string|Blob|ArrayBuffer} data
* @param {string=} endings
*/
BlobBuilder.prototype.append = function(data, endings) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob
* @param {string=} contentType
* @return {!Blob}
*/
BlobBuilder.prototype.getBlob = function(contentType) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
* @type {function(new:BlobBuilder)}
*/
Window.prototype.BlobBuilder;
/**
* This has replaced BlobBuilder in Chrome since WebKit revision 84008.
* @see http://lists.w3.org/Archives/Public/public-webapps/2011AprJun/0222.html
* @constructor
*/
function WebKitBlobBuilder() {}
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append0
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append1
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-append2
* @param {string|Blob|ArrayBuffer} data
* @param {string=} endings
*/
WebKitBlobBuilder.prototype.append = function(data, endings) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-BlobBuilder-getBlob
* @param {string=} contentType
* @return {!Blob}
*/
WebKitBlobBuilder.prototype.getBlob = function(contentType) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface
* @type {function(new:WebKitBlobBuilder)}
*/
Window.prototype.WebKitBlobBuilder;
/**
* @see http://www.w3.org/TR/file-system-api/#the-directoryentry-interface
* @constructor
* @extends {Entry}
*/
function DirectoryEntry() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-createReader
* @return {!DirectoryReader}
*/
DirectoryEntry.prototype.createReader = function() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getFile
* @param {string} path
* @param {Object=} options
* @param {function(!FileEntry)=} successCallback
* @param {function(!FileError)=} errorCallback
*/
DirectoryEntry.prototype.getFile = function(path, options, successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-getDirectory
* @param {string} path
* @param {Object=} options
* @param {function(!DirectoryEntry)=} successCallback
* @param {function(!FileError)=} errorCallback
*/
DirectoryEntry.prototype.getDirectory = function(path, options, successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-removeRecursively
* @param {function()} successCallback
* @param {function(!FileError)=} errorCallback
*/
DirectoryEntry.prototype.removeRecursively = function(successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-directoryreader-interface
* @constructor
*/
function DirectoryReader() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-DirectoryReader-readEntries
* @param {function(!Array.<!Entry>)} successCallback
* @param {function(!FileError)=} errorCallback
*/
DirectoryReader.prototype.readEntries = function(successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#the-entry-interface
* @constructor
*/
function Entry() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-isFile
* @type {boolean}
*/
Entry.prototype.isFile;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-isDirectory
* @type {boolean}
*/
Entry.prototype.isDirectory;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-name
* @type {string}
*/
Entry.prototype.name;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-fullPath
* @type {string}
*/
Entry.prototype.fullPath;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-filesystem
* @type {!FileSystem}
*/
Entry.prototype.filesystem;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-moveTo
* @param {!DirectoryEntry} parent
* @param {string=} newName
* @param {function(!Entry)=} successCallback
* @param {function(!FileError)=} errorCallback
*/
Entry.prototype.moveTo = function(parent, newName, successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-copyTo
* @param {!DirectoryEntry} parent
* @param {string=} newName
* @param {function(!Entry)=} successCallback
* @param {function(!FileError)=} errorCallback
*/
Entry.prototype.copyTo = function(parent, newName, successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-toURL
* @param {string=} mimeType
* @return {string}
*/
Entry.prototype.toURL = function(mimeType) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-remove
* @param {function()} successCallback
* @param {function(!FileError)=} errorCallback
*/
Entry.prototype.remove = function(successCallback, errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-getMetadata
* @param {function(!Metadata)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Entry.prototype.getMetadata = function(successCallback, errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Entry-getParent
* @param {function(!Entry)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Entry.prototype.getParent = function(successCallback, errorCallback) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-file
* @constructor
* @extends {Blob}
*/
function File() {}
/**
* Chrome uses this instead of name.
* @deprecated Use name instead.
* @type {string}
*/
File.prototype.fileName;
/**
* Chrome uses this instead of size.
* @deprecated Use size instead.
* @type {string}
*/
File.prototype.fileSize;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-name
* @type {string}
*/
File.prototype.name;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate
* @type {Date}
*/
File.prototype.lastModifiedDate;
/**
* @see http://www.w3.org/TR/file-system-api/#the-fileentry-interface
* @constructor
* @extends {Entry}
*/
function FileEntry() {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-createWriter
* @param {function(!FileWriter)} successCallback
* @param {function(!FileError)=} errorCallback
*/
FileEntry.prototype.createWriter = function(successCallback, errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileEntry-file
* @param {function(!File)} successCallback
* @param {function(!FileError)=} errorCallback
*/
FileEntry.prototype.file = function(successCallback, errorCallback) {};
/**
* @see http://www.w3.org/TR/FileAPI/#FileErrorInterface
* @constructor
*/
function FileError() {}
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-NOT_FOUND_ERR
* @type {number}
*/
FileError.prototype.NOT_FOUND_ERR = 1;
/** @type {number} */
FileError.NOT_FOUND_ERR = 1;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-SECURITY_ERR
* @type {number}
*/
FileError.prototype.SECURITY_ERR = 2;
/** @type {number} */
FileError.SECURITY_ERR = 2;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-ABORT_ERR
* @type {number}
*/
FileError.prototype.ABORT_ERR = 3;
/** @type {number} */
FileError.ABORT_ERR = 3;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-NOT_READABLE_ERR
* @type {number}
*/
FileError.prototype.NOT_READABLE_ERR = 4;
/** @type {number} */
FileError.NOT_READABLE_ERR = 4;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-ENCODING_ERR
* @type {number}
*/
FileError.prototype.ENCODING_ERR = 5;
/** @type {number} */
FileError.ENCODING_ERR = 5;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileError-NO_MODIFICATION_ALLOWED_ERR
* @type {number}
*/
FileError.prototype.NO_MODIFICATION_ALLOWED_ERR = 6;
/** @type {number} */
FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileException-INVALID_STATE_ERR
* @type {number}
*/
FileError.prototype.INVALID_STATE_ERR = 7;
/** @type {number} */
FileError.INVALID_STATE_ERR = 7;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileException-SYNTAX_ERR
* @type {number}
*/
FileError.prototype.SYNTAX_ERR = 8;
/** @type {number} */
FileError.SYNTAX_ERR = 8;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileError-INVALID_MODIFICATION_ERR
* @type {number}
*/
FileError.prototype.INVALID_MODIFICATION_ERR = 9;
/** @type {number} */
FileError.INVALID_MODIFICATION_ERR = 9;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileError-QUOTA_EXCEEDED_ERR
* @type {number}
*/
FileError.prototype.QUOTA_EXCEEDED_ERR = 10;
/** @type {number} */
FileError.QUOTA_EXCEEDED_ERR = 10;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-TYPE_MISMATCH_ERR
* @type {number}
*/
FileError.prototype.TYPE_MISMATCH_ERR = 11;
/** @type {number} */
FileError.TYPE_MISMATCH_ERR = 11;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileException-PATH_EXISTS_ERR
* @type {number}
*/
FileError.prototype.PATH_EXISTS_ERR = 12;
/** @type {number} */
FileError.PATH_EXISTS_ERR = 12;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-code-exception
* @type {number}
*/
FileError.prototype.code;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-filereader
* @constructor
* @implements {EventTarget}
*/
function FileReader() {}
/** @override */
FileReader.prototype.addEventListener = function(type, listener, useCapture) {};
/** @override */
FileReader.prototype.removeEventListener = function(type, listener, useCapture)
{};
/** @override */
FileReader.prototype.dispatchEvent = function(evt) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer
* @param {!Blob} blob
*/
FileReader.prototype.readAsArrayBuffer = function(blob) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsBinaryStringAsync
* @param {!Blob} blob
*/
FileReader.prototype.readAsBinaryString = function(blob) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsText
* @param {!Blob} blob
* @param {string=} encoding
*/
FileReader.prototype.readAsText = function(blob, encoding) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readAsDataURL
* @param {!Blob} blob
*/
FileReader.prototype.readAsDataURL = function(blob) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-abort
*/
FileReader.prototype.abort = function() {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-empty
* @type {number}
*/
FileReader.prototype.EMPTY = 0;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-loading
* @type {number}
*/
FileReader.prototype.LOADING = 1;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-done
* @type {number}
*/
FileReader.prototype.DONE = 2;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-readystate
* @type {number}
*/
FileReader.prototype.readyState;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-result
* @type {string|Blob|ArrayBuffer}
*/
FileReader.prototype.result;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-error
* @type {FileError}
*/
FileReader.prototype.error;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadstart
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onloadstart;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onprogress
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onprogress;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onload
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onload;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onabort
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onabort;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onerror
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onerror;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-onloadend
* @type {?function(!ProgressEvent)}
*/
FileReader.prototype.onloadend;
/**
* @see http://www.w3.org/TR/file-writer-api/#idl-def-FileSaver
* @constructor
*/
function FileSaver() {};
/** @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-abort */
FileSaver.prototype.abort = function() {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-INIT
* @type {number}
*/
FileSaver.prototype.INIT = 0;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-WRITING
* @type {number}
*/
FileSaver.prototype.WRITING = 1;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-DONE
* @type {number}
*/
FileSaver.prototype.DONE = 2;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-readyState
* @type {number}
*/
FileSaver.prototype.readyState;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-error
* @type {FileError}
*/
FileSaver.prototype.error;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwritestart
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onwritestart;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onprogress
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onprogress;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwrite
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onwrite;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onabort
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onabort;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onerror
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onerror;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileSaver-onwriteend
* @type {?function(!ProgressEvent)}
*/
FileSaver.prototype.onwriteend;
/**
* @see http://www.w3.org/TR/file-system-api/#the-filesystem-interface
* @constructor
*/
function FileSystem() {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-name
* @type {string}
*/
FileSystem.prototype.name;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-FileSystem-root
* @type {!DirectoryEntry}
*/
FileSystem.prototype.root;
/**
* @see http://www.w3.org/TR/file-writer-api/#idl-def-FileWriter
* @constructor
* @extends {FileSaver}
*/
function FileWriter() {}
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-position
* @type {number}
*/
FileWriter.prototype.position;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-length
* @type {number}
*/
FileWriter.prototype.length;
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-write
* @param {!Blob} blob
*/
FileWriter.prototype.write = function(blob) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-seek
* @param {number} offset
*/
FileWriter.prototype.seek = function(offset) {};
/**
* @see http://www.w3.org/TR/file-writer-api/#widl-FileWriter-truncate
* @param {number} size
*/
FileWriter.prototype.truncate = function(size) {};
/**
* LocalFileSystem interface, implemented by Window and WorkerGlobalScope.
* @see http://www.w3.org/TR/file-system-api/#idl-def-LocalFileSystem
* @constructor
*/
function LocalFileSystem() {}
/**
* Metadata interface.
* @see http://www.w3.org/TR/file-system-api/#idl-def-Metadata
* @constructor
*/
function Metadata() {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Metadata-modificationTime
* @type {!Date}
*/
Metadata.prototype.modificationTime;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-Metadata-size
* @type {number}
*/
Metadata.prototype.size;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-TEMPORARY
* @type {number}
*/
Window.prototype.TEMPORARY = 0;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-PERSISTENT
* @type {number}
*/
Window.prototype.PERSISTENT = 1;
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
* @param {number} type
* @param {number} size
* @param {function(!FileSystem)} successCallback
* @param {function(!FileError)=} errorCallback
*/
function requestFileSystem(type, size, successCallback, errorCallback) {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
* @param {number} type
* @param {number} size
* @param {function(!FileSystem)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Window.prototype.requestFileSystem = function(type, size, successCallback,
errorCallback) {};
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
* @param {string} uri
* @param {function(!Entry)} successCallback
* @param {function(!FileError)=} errorCallback
*/
function resolveLocalFileSystemURI(uri, successCallback, errorCallback) {}
/**
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
* @param {string} uri
* @param {function(!Entry)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Window.prototype.resolveLocalFileSystemURI = function(uri, successCallback,
errorCallback) {}
/**
* This has replaced requestFileSystem in Chrome since WebKit revision 84224.
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
* @param {number} type
* @param {number} size
* @param {function(!FileSystem)} successCallback
* @param {function(!FileError)=} errorCallback
*/
function webkitRequestFileSystem(type, size, successCallback, errorCallback) {}
/**
* This has replaced requestFileSystem in Chrome since WebKit revision 84224.
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-requestFileSystem
* @param {number} type
* @param {number} size
* @param {function(!FileSystem)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Window.prototype.webkitRequestFileSystem = function(type, size, successCallback,
errorCallback) {};
/**
* This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision
* 84224.
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
* @param {string} uri
* @param {function(!Entry)} successCallback
* @param {function(!FileError)=} errorCallback
*/
function webkitResolveLocalFileSystemURI(uri, successCallback, errorCallback) {}
/**
* This has replaced resolveLocalFileSystemURI in Chrome since WebKit revision
* 84224.
* @see http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURI
* @param {string} uri
* @param {function(!Entry)} successCallback
* @param {function(!FileError)=} errorCallback
*/
Window.prototype.webkitResolveLocalFileSystemURI = function(uri, successCallback,
errorCallback) {}
// WindowBlobURIMethods interface, implemented by Window and WorkerGlobalScope.
// There are three APIs for this: the old specced API, the new specced API, and
// the webkit-prefixed API.
// @see http://www.w3.org/TR/FileAPI/#creating-revoking
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
* @param {!Object} obj
* @return {string}
*/
function createObjectURL(obj) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
* @param {!Object} obj
* @return {string}
*/
Window.prototype.createObjectURL = function(obj) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
* @param {string} url
*/
function revokeObjectURL(url) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
* @param {string} url
*/
Window.prototype.revokeObjectURL = function(url) {};
/**
* @see http://www.w3.org/TR/FileAPI/#URL-object
* @constructor
*/
function DOMURL() {}
/**
* @see http://www.w3.org/TR/FileAPI/#
* @type {!DOMURL}
*/
Window.prototype.URL;
/**
* This has replaced URL in Chrome since WebKit revision 75739.
* @see http://www.w3.org/TR/FileAPI/#
* @type {!DOMURL}
*/
Window.prototype.webkitURL;
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-createObjectURL
* @param {!Object} obj
* @return {string}
*/
DOMURL.prototype.createObjectURL = function(obj) {};
/**
* @see http://www.w3.org/TR/FileAPI/#dfn-revokeObjectURL
* @param {string} url
*/
DOMURL.prototype.revokeObjectURL = function(url) {};
/**
* @see https://developers.google.com/chrome/whitepapers/storage
* @constructor
*/
function StorageInfo() {}
/**
* @see https://developers.google.com/chrome/whitepapers/storage
* @type {number}
* */
StorageInfo.prototype.TEMPORARY = 0;
/**
* @see https://developers.google.com/chrome/whitepapers/storage
* @type {number}
*/
StorageInfo.prototype.PERSISTENT = 1;
/**
* @see https://developers.google.com/chrome/whitepapers/storage#requestQuota
* @param {number} type
* @param {number} size
* @param {function(number)} successCallback
* @param {function(!DOMException)=} errorCallback
*/
StorageInfo.prototype.requestQuota = function(type, size, successCallback,
errorCallback) {};
/**
* @see https://developers.google.com/chrome/whitepapers/storage#queryUsageAndQuota
* @param {number} type
* @param {function(number, number)} successCallback
* @param {function(!DOMException)=} errorCallback
*/
StorageInfo.prototype.queryUsageAndQuota = function(type, successCallback,
errorCallback) {};
/**
* @see https://developers.google.com/chrome/whitepapers/storage
* @type {!StorageInfo}
*/
Window.prototype.webkitStorageInfo;

View File

@ -0,0 +1,210 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the Flash Object JavaScript methods. This
* file depends on w3c_dom2.js.
* Created from
* http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html
*
* @externs
*/
// Standard Methods.
/**
* Call a Flash function exported by ExternalInterface.
* @param {string} xmlString The XML string passed to Flash. The outer element
* should be {@code <invoke>}. A sample invocation string:
* {@code <invoke name="function_name" returntype="javascript">
* <string>test</string></invoke>}
* @return {string} The serialized return value from Flash that you can eval.
*/
HTMLObjectElement.prototype.CallFunction = function(xmlString) {};
/**
* Returns the value of the Flash variable specified by varName or null if the
* variable does not exist.
* @param {string} varName The variable name.
* @return {string?} The variable value.
*/
HTMLObjectElement.prototype.GetVariable = function(varName) {};
/**
* Activates the frame number specified by {@code frameNumber} in the current
* movie.
* @param {number} frameNumber A non-negative integer frame number.
*/
HTMLObjectElement.prototype.GotoFrame = function(frameNumber) {};
/**
* @return {boolean} Whether the movie is currently playing.
*/
HTMLObjectElement.prototype.IsPlaying = function() {};
/**
* Loads the movie identified by {@code url} to the layer specified by {@code
* layerNumber}.
* @param {number} layerNumber The layer number.
* @param {string} url The movie URL.
*/
HTMLObjectElement.prototype.LoadMovie = function(layerNumber, url) {};
/**
* Pans a zoomed-in movie to the coordinates specified by x and y. Use mode to
* specify whether the values for x and y are pixels or a percent of the window.
* When mode is 0, the coordinates are pixels; when mode is 1, the coordinates
* are percent of the window.
* @param {number} x The x-coordinate.
* @param {number} y The y-coordinate.
* @param {number} mode The mode.
*/
HTMLObjectElement.prototype.Pan = function(x, y, mode) {};
/**
* @return {number} The percent of the Flash Player movie that has streamed
* into the browser so far; Possible values are from 0 to 100.
*/
HTMLObjectElement.prototype.PercentLoaded = function() {};
/**
* Starts playing the movie.
*/
HTMLObjectElement.prototype.Play = function() {};
/**
* Goes to the first frame.
*/
HTMLObjectElement.prototype.Rewind = function() {};
/**
* Sets the value of the flash variable.
* @param {string} variableName The variable name.
* @param {string} value The value.
*/
HTMLObjectElement.prototype.SetVariable = function(variableName, value) {};
/**
* Zooms in on a rectangular area of the movie. The units of the coordinates
* are in twips (1440 units per inch).
* @param {number} left The left coordinate.
* @param {number} top The top coordinate.
* @param {number} right The right coordinate.
* @param {number} bottom The bottom coordinate.
*/
HTMLObjectElement.prototype.SetZoomRect = function(left, top, right, bottom) {};
/**
* Stops playing the movie.
*/
HTMLObjectElement.prototype.StopPlay = function() {};
/**
* @return {number} The total number of frames in the movie.
*/
HTMLObjectElement.prototype.TotalFrames = function() {};
/**
* Zooms the view by a relative scale factor.
* @param {number} percent The percentage scale factor, should be an integer.
*/
HTMLObjectElement.prototype.Zoom = function(percent) {};
// TellTarget Methods.
/**
* Executes the action in the timeline specified by {@code target} in the
* specified frame.
* @param {string} target The timeline.
* @param {number} frameNumber The frame number.
*/
HTMLObjectElement.prototype.TCallFrame = function(target, frameNumber) {};
/**
* Executes the action in the timeline specified by {@code target} in the
* specified frame.
* @param {string} target The timeline.
* @param {string} label The frame label.
*/
HTMLObjectElement.prototype.TCallLabel = function(target, label) {};
/**
* Returns the number of the current frame for the specified timeline.
* @param {string} target The timeline.
* @return {number} The number of the current frame.
*/
HTMLObjectElement.prototype.TCurentFrame = function(target) {};
/**
* Returns the label of the current frame for the specified timeline.
* @param {string} target The timeline.
* @return {string} The label of the current frame, empty string if no
* current frame.
*/
HTMLObjectElement.prototype.TCurrentLabel = function(target) {};
/**
* Returns a string indicating the value of the property in the
* specified timeline.
* @param {string} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @return {string} The value of the property.
*/
HTMLObjectElement.prototype.TGetProperty = function(target, property) {};
/**
* Returns a number indicating the value of the property in the specified
* timeline.
* @param {string} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @return {number} A number indicating the value of the property.
*/
HTMLObjectElement.prototype.TGetPropertyAsNumber = function(target, property) {};
/**
* Goes to the specified frame number in the specified timeline.
* @param {string} target The timeline.
* @param {number} frameNumber The frame number.
*/
HTMLObjectElement.prototype.TGotoFrame = function(target, frameNumber) {};
/**
* Goes to the specified frame label in the specified timeline.
* @param {string} target The timeline.
* @param {string} label The framelabel.
*/
HTMLObjectElement.prototype.TGotoLabel = function(target, label) {};
/**
* Plays the specified timeline.
* @param {number} target The timeline.
*/
HTMLObjectElement.prototype.TPlay = function(target) {};
/**
* Sets the value of the property in the specified timeline.
* @param {number} target The timeline.
* @param {number} property The integer corresponding to the desired property.
* @param {string|number} value The value.
*/
HTMLObjectElement.prototype.TSetProperty = function(target, property, value) {};
/**
* Stops the specified timeline.
* @param {number} target The timeline.
*/
HTMLObjectElement.prototype.TStopPlay = function(target) {};

View File

@ -0,0 +1,37 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Global symbols injected by Google Gears.
* @externs
* @author nicksantos@google.com (Nick Santos)
*/
/**
* Suppresses the compiler warning when multiple externs files declare the
* google namespace.
* @suppress {duplicate}
* @noalias
*/
var google = {};
google.gears = {};
/** @type {GearsFactory} */
google.gears.factory;
/** @type {GearsWorkerPool} */
google.gears.workerPool;

View File

@ -0,0 +1,641 @@
/*
* Copyright 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Extern types introduced by the Gears extension.
* @externs
*/
/** @constructor */
function GearsFactory() {}
/**
* @param {*=} opt_classVersion
* @return {Object}
*/
GearsFactory.prototype.create = function(className, opt_classVersion) {};
/** @return {string} */
GearsFactory.prototype.getBuildInfo = function() {};
/**
* @param {*=} opt_siteName
* @param {*=} opt_imageUrl
* @param {*=} opt_extraMessage
* @return {boolean}
*/
GearsFactory.prototype.getPermission = function(opt_siteName,
opt_imageUrl,
opt_extraMessage) {};
/** @type {boolean} */
GearsFactory.prototype.hasPermission = false;
/** @param {Object} globalObject */
GearsFactory.prototype.privateSetGlobalObject = function(globalObject) {};
/** @type {string} */
GearsFactory.prototype.version;
/** @constructor */
function GearsBlob() {}
/** @type {number} */
GearsBlob.prototype.length = 0;
/** @return {GearsBlob} */
GearsBlob.prototype.slice = function(offset, length) {};
/** @constructor */
function GearsBlobBuilder() {}
/** @param {string|GearsBlob} appendee */
GearsBlobBuilder.prototype.append = function(appendee) {};
/** @return {GearsBlob} */
GearsBlobBuilder.prototype.getAsBlob = function() {};
/** @constructor */
function GearsDatabase() {}
/** @param {string=} opt_name */
GearsDatabase.prototype.open = function(opt_name) {};
/**
* @param {*=} opt_argArray
* @return {GearsResultSet}
*/
GearsDatabase.prototype.execute = function(sqlStatement, opt_argArray) {};
GearsDatabase.prototype.close = function() {};
GearsDatabase.prototype.remove = function() {};
/** @type {number} */
GearsDatabase.prototype.lastInsertRowId = 0;
/** @type {number} */
GearsDatabase.prototype.rowsAffected = 0;
/** @constructor */
function GearsResultSet() {}
/** @return {boolean} */
GearsResultSet.prototype.isValidRow = function() {};
GearsResultSet.prototype.next = function() {};
GearsResultSet.prototype.close = function() {};
/** @return {number} */
GearsResultSet.prototype.fieldCount = function() {};
/** @return {string} */
GearsResultSet.prototype.fieldName = function(fieldIndex) {};
GearsResultSet.prototype.field = function(fieldIndex) {};
GearsResultSet.prototype.fieldByName = function(fieldName) {};
/** @constructor */
function GearsDesktop() {}
/**
* @param {string} name The name of the shortcut.
* @param {string} url The URL for the shortcut.
* @param {Object} icons The icon set to use for the shortcut.
* @param {string=} opt_description The description of the shortcut.
*/
GearsDesktop.prototype.createShortcut = function(name,
url,
icons,
opt_description) {};
/**
* @param {GearsBlob} blob The blob to get metadata for.
* @return {Object} The metadata object.
*/
GearsDesktop.prototype.extractMetaData = function(blob) { return null; };
/**
* @param {Object} event The event object we're calling from.
* @param {string} flavor The type of object to get.
* @return {Object} The drag data.
*/
GearsDesktop.prototype.getDragData = function(event, flavor) { return null; };
/**
* @param {function(Array.<GearsFile>)} callback The callback after opening.
* @param {GearsOpenFileOptions=} opt_options The options to use for opening.
*/
GearsDesktop.prototype.openFiles = function(callback, opt_options) {};
/**
* @param {Object} event
* @param {string} dropEffect
*/
GearsDesktop.prototype.setDropEffect = function(event, dropEffect) {};
/** @constructor */
function GearsFile() {}
/** @type {string} */
GearsFile.prototype.name = '';
/** @type {GearsBlob} */
GearsFile.prototype.blob;
/** @constructor */
function GearsOpenFileOptions() {}
/** @type {boolean} */
GearsOpenFileOptions.prototype.singleFile = false;
/** @type {Array.<string>} */
GearsOpenFileOptions.prototype.filter = [];
/** @constructor */
function GearsGeolocation() {}
/** @const @type {GearsPosition} */
GearsGeolocation.prototype.lastPosition;
/**
* @param {function(GearsPosition)} successCallback
* @param {(function(GearsPositionError)|null)=} opt_errorCallback
* @param {GearsPositionOptions=} opt_options
*/
GearsGeolocation.prototype.getCurrentPosition = function(successCallback,
opt_errorCallback,
opt_options) {};
/**
* @param {function(GearsPosition)} successCallback
* @param {(function(GearsPositionError)|null)=} opt_errorCallback
* @param {GearsPositionOptions=} opt_options
* @return {number}
*/
GearsGeolocation.prototype.watchPosition = function(successCallback,
opt_errorCallback,
opt_options) {};
/** @param {number} watchId */
GearsGeolocation.prototype.clearWatch = function(watchId) {};
/**
* @param {string=} opt_siteName
* @param {string=} opt_imageUrl
* @param {string=} opt_extraMessage
* @return {boolean}
*/
GearsGeolocation.prototype.getPermission = function(opt_siteName,
opt_imageUrl,
opt_extraMessage) {};
/** @constructor */
function GearsCoords() {}
/** @const @type {number} */
GearsCoords.prototype.latitude;
/** @const @type {number} */
GearsCoords.prototype.longitude;
/** @const @type {number} */
GearsCoords.prototype.accuracy;
/** @const @type {number} */
GearsCoords.prototype.altitude;
/** @const @type {number} */
GearsCoords.prototype.altitudeAccuracy;
/** @constructor */
function GearsPosition() {}
/** @const @type {number} */
GearsPosition.prototype.latitude;
/** @const @type {number} */
GearsPosition.prototype.longitude;
/** @const @type {number} */
GearsPosition.prototype.accuracy;
/** @const @type {number} */
GearsPosition.prototype.altitude;
/** @const @type {number} */
GearsPosition.prototype.altitudeAccuracy;
/** @const @type {GearsCoords} */
GearsPosition.prototype.coords;
/** @const @type {Date} */
GearsPosition.prototype.timestamp;
/** @const @type {GearsAddress} */
GearsPosition.prototype.gearsAddress;
/** @constructor */
function GearsPositionOptions() {}
/** @type {boolean} */
GearsPositionOptions.prototype.enableHighAccuracy;
/** @type {boolean} */
GearsPositionOptions.prototype.gearsRequestAddress;
/** @type {string} */
GearsPositionOptions.prototype.gearsAddressLanguage = '';
/** @type {Array.<string>} */
GearsPositionOptions.prototype.gearsLocationProviderUrls;
/** @type {number} */
GearsPositionOptions.prototype.maximumAge;
/** @type {number} */
GearsPositionOptions.prototype.timeout;
/** @constructor */
function GearsPositionError() {}
/** @const @type {number} */
GearsPositionError.prototype.code = 0;
/** @const @type {string} */
GearsPositionError.prototype.message = '';
/** @const @type {number} */
GearsPositionError.prototype.UNKNOWN_ERROR;
/** @const @type {number} */
GearsPositionError.prototype.PERMISSION_DENIED;
/** @const @type {number} */
GearsPositionError.prototype.POSITION_UNAVAILABLE;
/** @const @type {number} */
GearsPositionError.prototype.TIMEOUT;
/** @constructor */
function GearsAddress() {}
/** @const @type {string} */
GearsAddress.prototype.streetNumber = '';
/** @const @type {string} */
GearsAddress.prototype.street = '';
/** @const @type {string} */
GearsAddress.prototype.premises = '';
/** @const @type {string} */
GearsAddress.prototype.city = '';
/** @const @type {string} */
GearsAddress.prototype.county = '';
/** @const @type {string} */
GearsAddress.prototype.region = '';
/** @const @type {string} */
GearsAddress.prototype.country = '';
/** @const @type {string} */
GearsAddress.prototype.countryCode = '';
/** @const @type {string} */
GearsAddress.prototype.postalCode = '';
/** @constructor */
function GearsHttpRequest() {}
GearsHttpRequest.prototype.open = function(method, url, opt_async) {};
GearsHttpRequest.prototype.setRequestHeader = function(name, value) {};
/**
* @param {(string|GearsBlob|null)=} opt_postData
*/
GearsHttpRequest.prototype.send = function(opt_postData) {};
GearsHttpRequest.prototype.abort = function() {};
/** @return {string} */
GearsHttpRequest.prototype.getResponseHeader = function(name) {};
/** @return {string} */
GearsHttpRequest.prototype.getAllResponseHeaders = function() {};
/** @type {function(GearsProgressEvent)|null} */
GearsHttpRequest.prototype.onprogress = function(progressEvent) {};
GearsHttpRequest.prototype.onreadystatechange = function() {};
/** @type {number} */
GearsHttpRequest.prototype.readyState = 0;
/** @type {GearsBlob} */
GearsHttpRequest.prototype.responseBlob;
/** @type {string} */
GearsHttpRequest.prototype.responseText = '';
/** @type {number} */
GearsHttpRequest.prototype.status = 0;
/** @type {string} */
GearsHttpRequest.prototype.statusText = '';
/** @type {GearsHttpRequestUpload} */
GearsHttpRequest.prototype.upload;
/** @constructor */
function GearsHttpRequestUpload() {}
/** @type {function(GearsProgressEvent)|null} */
GearsHttpRequestUpload.prototype.onprogress = function(progressEvent) {};
/** @constructor */
function GearsProgressEvent() {}
/** @type {number} */
GearsProgressEvent.prototype.total = 0;
/** @type {number} */
GearsProgressEvent.prototype.loaded = 0;
/** @type {boolean} */
GearsProgressEvent.prototype.lengthComputable;
/** @constructor */
function GearsLocalServer() {}
/** @return {boolean} */
GearsLocalServer.prototype.canServeLocally = function(url) {};
/**
* @param {*=} opt_requiredCookie
* @return {GearsResourceStore}
*/
GearsLocalServer.prototype.createStore = function(name, opt_requiredCookie) {};
/**
* @param {*=} opt_requiredCookie
* @return {GearsResourceStore}
*/
GearsLocalServer.prototype.openStore = function(name, opt_requiredCookie) {};
/**
* @param {*=} opt_requiredCookie
*/
GearsLocalServer.prototype.removeStore = function(name, opt_requiredCookie) {};
/**
* @param {*=} opt_requiredCookie
* @return {GearsManagedResourceStore}
*/
GearsLocalServer.prototype.createManagedStore = function(name,
opt_requiredCookie) {};
/**
* @param {*=} opt_requiredCookie
* @return {GearsManagedResourceStore}
*/
GearsLocalServer.prototype.openManagedStore = function(name,
opt_requiredCookie) {};
/**
* @param {*=} opt_requiredCookie
*/
GearsLocalServer.prototype.removeManagedStore = function(name,
opt_requiredCookie) {};
/** @constructor */
function GearsManagedResourceStore() {}
/** @type {string} */
GearsManagedResourceStore.prototype.name = '';
/** @type {string} */
GearsManagedResourceStore.prototype.requiredCookie = '';
/** @type {boolean} */
GearsManagedResourceStore.prototype.enabled = false;
/** @type {string} */
GearsManagedResourceStore.prototype.manifestUrl = '';
/** @type {number} */
GearsManagedResourceStore.prototype.lastUpdateCheckTime = 0;
/** @type {number} */
GearsManagedResourceStore.prototype.updateStatus = 0;
/** @type {string} */
GearsManagedResourceStore.prototype.lastErrorMessage = '';
/** @type {string} */
GearsManagedResourceStore.prototype.currentVersion = '';
/** @type {function(GearsCompleteObject)|null} */
GearsManagedResourceStore.prototype.oncomplete = function(details) {};
/** @type {function(GearsErrorObject)|null} */
GearsManagedResourceStore.prototype.onerror = function(error) {};
/** @type {function(GearsProgressObject)|null} */
GearsManagedResourceStore.prototype.onprogress = function(details) {};
GearsManagedResourceStore.prototype.checkForUpdate = function() {};
/** @constructor */
function GearsResourceStore() {}
/** @type {string} */
GearsResourceStore.prototype.name = '';
/** @type {string} */
GearsResourceStore.prototype.requiredCookie = '';
/** @type {boolean} */
GearsResourceStore.prototype.enabled = false;
/** @return {number} */
GearsResourceStore.prototype.capture = function(urlOrUrlArray, callback) {};
/**
* @param {GearsBlob} blob
* @param {string} url
* @param {string=} opt_contentType
*/
GearsResourceStore.prototype.captureBlob = function(blob,
url,
opt_contentType) {};
GearsResourceStore.prototype.abortCapture = function(captureId) {};
GearsResourceStore.prototype.remove = function(url) {};
GearsResourceStore.prototype.rename = function(srcUrl, destUrl) {};
GearsResourceStore.prototype.copy = function(srcUrl, destUrl) {};
/** @return {boolean} */
GearsResourceStore.prototype.isCaptured = function(url) {};
GearsResourceStore.prototype.captureFile = function(fileInputElement, url) {};
/** @return {string} */
GearsResourceStore.prototype.getCapturedFileName = function(url) {};
/** @return {string} */
GearsResourceStore.prototype.getHeader = function(url, name) {};
/** @return {string} */
GearsResourceStore.prototype.getAllHeaders = function(url) {};
/**
* @param {string} url
* @return {GearsBlob}
*/
GearsResourceStore.prototype.getAsBlob = function(url) {};
/** @return {GearsFileSubmitter} */
GearsResourceStore.prototype.createFileSubmitter = function() {};
/** @constructor */
function GearsFileSubmitter() {}
GearsFileSubmitter.prototype.setFileInputElement = function(htmlElement,
url) {};
/** @constructor */
function GearsTimer() {}
/** @return {number} */
GearsTimer.prototype.setTimeout = function(fullScriptOrCallback, msecDelay) {};
/** @return {number} */
GearsTimer.prototype.setInterval = function(fullScript, msecDelay) {};
GearsTimer.prototype.clearTimeout = function(timerId) {};
GearsTimer.prototype.clearInterval = function(timerId) {};
/** @constructor */
function GearsWorkerPool() {}
/**
* @param {string} messageText The message contents
* (Deprecated, use messageObject.text)
* @param {number} senderId ID of the source worker.
* (Deprecated, use messageObject.sender)
* @param {GearsMessageObject} messageObject An object containing
* all information about a message.
*/
GearsWorkerPool.prototype.onmessage = function(messageText,
senderId,
messageObject) {};
/**
* @param {!GearsErrorObject} errorObject An object that explains
* the problem.
* @return {boolean|undefined} Return true to indicate that the error was
* handled, which prevents it from bubbling up to the parent.
*/
GearsWorkerPool.prototype.onerror = function(errorObject) {};
/** @return {number} */
GearsWorkerPool.prototype.createWorker = function(scriptText) {};
/** @return {number} */
GearsWorkerPool.prototype.createWorkerFromUrl = function(scriptUrl) {};
/**
* @param {*} message
* @param {number} destWorkerId
*/
GearsWorkerPool.prototype.sendMessage = function(message, destWorkerId) {};
GearsWorkerPool.prototype.allowCrossOrigin = function() {};
/** @constructor */
function GearsMessageObject() {}
/** @type {string} */
GearsMessageObject.prototype.text = '';
/** @type {string} */
GearsMessageObject.prototype.sender = '';
/** @type {string} */
GearsMessageObject.prototype.origin = '';
/** @type {*} */
GearsMessageObject.prototype.body;
/** @constructor */
function GearsCompleteObject() {}
/** @type {string} */
GearsCompleteObject.prototype.newVersion = '';
/** @constructor */
function GearsErrorObject() {}
/** @type {string} */
GearsErrorObject.prototype.message = '';
/** @type {number} */
GearsErrorObject.prototype.lineNumber;
/** @constructor */
function GearsProgressObject() {}
/** @type {number} */
GearsProgressObject.prototype.filesComplete = 0;
/** @type {number} */
GearsProgressObject.prototype.filesTotal = 0;

View File

@ -0,0 +1,125 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for Gecko's custom CSS properties. Copied from:
* http://mxr.mozilla.org/mozilla2.0/source/dom/interfaces/css/nsIDOMCSS2Properties.idl
*
* @externs
* @author nicksantos@google.com (Nick Santos)
*/
/** @type {string} */ CSSProperties.prototype.MozAppearance;
/** @type {string} */ CSSProperties.prototype.MozBackfaceVisibility;
/** @type {string} */ CSSProperties.prototype.MozBackgroundClip;
/** @type {string} */ CSSProperties.prototype.MozBackgroundInlinePolicy;
/** @type {string} */ CSSProperties.prototype.MozBackgroundOrigin;
/** @type {string} */ CSSProperties.prototype.MozBinding;
/** @type {string} */ CSSProperties.prototype.MozBorderBottomColors;
/** @type {string} */ CSSProperties.prototype.MozBorderEnd;
/** @type {string} */ CSSProperties.prototype.MozBorderEndColor;
/** @type {string} */ CSSProperties.prototype.MozBorderEndStyle;
/** @type {string} */ CSSProperties.prototype.MozBorderEndWidth;
/** @type {string} */ CSSProperties.prototype.MozBorderImage;
/** @type {string} */ CSSProperties.prototype.MozBorderLeftColors;
/** @type {string} */ CSSProperties.prototype.MozBorderRadius;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopleft;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusTopright;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomleft;
/** @type {string} */ CSSProperties.prototype.MozBorderRadiusBottomright;
/** @type {string} */ CSSProperties.prototype.MozBorderRightColors;
/** @type {string} */ CSSProperties.prototype.MozBorderStart;
/** @type {string} */ CSSProperties.prototype.MozBorderStartColor;
/** @type {string} */ CSSProperties.prototype.MozBorderStartStyle;
/** @type {string} */ CSSProperties.prototype.MozBorderStartWidth;
/** @type {string} */ CSSProperties.prototype.MozBorderTopColors;
/** @type {string} */ CSSProperties.prototype.MozBoxAlign;
/** @type {string} */ CSSProperties.prototype.MozBoxDirection;
/** @type {string} */ CSSProperties.prototype.MozBoxFlex;
/** @type {string} */ CSSProperties.prototype.MozBoxOrdinalGroup;
/** @type {string} */ CSSProperties.prototype.MozBoxOrient;
/** @type {string} */ CSSProperties.prototype.MozBoxPack;
/** @type {string} */ CSSProperties.prototype.MozBoxSizing;
/** @type {string} */ CSSProperties.prototype.MozColumnCount;
/** @type {string} */ CSSProperties.prototype.MozColumnGap;
/** @type {string} */ CSSProperties.prototype.MozColumnRule;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleColor;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleStyle;
/** @type {string} */ CSSProperties.prototype.MozColumnRuleWidth;
/** @type {string} */ CSSProperties.prototype.MozColumnWidth;
/** @type {string} */ CSSProperties.prototype.MozFloatEdge;
/** @type {string} */ CSSProperties.prototype.MozFontFeatureSettings;
/** @type {string} */ CSSProperties.prototype.MozFontLanguageOverride;
/** @type {string} */ CSSProperties.prototype.MozForceBrokenImageIcon;
/** @type {string} */ CSSProperties.prototype.MozImageRegion;
/** @type {string} */ CSSProperties.prototype.MozMarginEnd;
/** @type {string} */ CSSProperties.prototype.MozMarginStart;
/** @type {number|string} */ CSSProperties.prototype.MozOpacity;
/** @type {string} */ CSSProperties.prototype.MozOutline;
/** @type {string} */ CSSProperties.prototype.MozOutlineColor;
/** @type {string} */ CSSProperties.prototype.MozOutlineOffset;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadius;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomleft;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusBottomright;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopleft;
/** @type {string} */ CSSProperties.prototype.MozOutlineRadiusTopright;
/** @type {string} */ CSSProperties.prototype.MozOutlineStyle;
/** @type {string} */ CSSProperties.prototype.MozOutlineWidth;
/** @type {string} */ CSSProperties.prototype.MozPaddingEnd;
/** @type {string} */ CSSProperties.prototype.MozPaddingStart;
/** @type {string} */ CSSProperties.prototype.MozPerspective;
/** @type {string} */ CSSProperties.prototype.MozStackSizing;
/** @type {string} */ CSSProperties.prototype.MozTabSize;
/** @type {string} */ CSSProperties.prototype.MozTransform;
/** @type {string} */ CSSProperties.prototype.MozTransformOrigin;
/** @type {string} */ CSSProperties.prototype.MozTransition;
/** @type {string} */ CSSProperties.prototype.MozTransitionDelay;
/** @type {string} */ CSSProperties.prototype.MozTransitionDuration;
/** @type {string} */ CSSProperties.prototype.MozTransitionProperty;
/** @type {string} */ CSSProperties.prototype.MozTransitionTimingFunction;
/** @type {string} */ CSSProperties.prototype.MozUserFocus;
/** @type {string} */ CSSProperties.prototype.MozUserInput;
/** @type {string} */ CSSProperties.prototype.MozUserModify;
/** @type {string} */ CSSProperties.prototype.MozUserSelect;
/** @type {string} */ CSSProperties.prototype.MozWindowShadow;
// These are non-standard Gecko CSSOM properties on Window.prototype.screen.
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.availTop
*/
Screen.prototype.availTop;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.availLeft
*/
Screen.prototype.availLeft;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.left
*/
Screen.prototype.left;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/window.screen.top
*/
Screen.prototype.top;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over
* W3C's event specification by Gecko. This file depends on
* w3c_event.js.
*
* @externs
*/
// TODO: Almost all of it has not been annotated with types.
/** @type {number} */ Event.prototype.HORIZONTAL_AXIS;
/** @type {number} */ Event.prototype.VERTICAL_AXIS;
/** @type {boolean} */ Event.prototype.altKey;
/** @type {number} */ Event.prototype.axis;
/** @type {number} */ Event.prototype.button;
/** @type {boolean} */ Event.prototype.cancelBubble;
/** @type {number} */ Event.prototype.charCode;
/** @type {number} */ Event.prototype.clientX;
/** @type {number} */ Event.prototype.clientY;
/** @type {boolean} */ Event.prototype.ctrlKey;
/** @type {number} */ Event.prototype.detail;
/** @type {EventTarget} */ Event.prototype.explicitOriginalTarget;
/** @type {boolean} */ Event.prototype.isChar;
/** @type {number} */ Event.prototype.keyCode;
/** @type {number} */ Event.prototype.layerX;
/** @type {number} */ Event.prototype.layerY;
/** @type {boolean} */ Event.prototype.metaKey;
/** @type {EventTarget} */ Event.prototype.originalTarget;
/** @type {number} */ Event.prototype.pageX;
/** @type {number} */ Event.prototype.pageY;
/** @type {EventTarget} */ Event.prototype.relatedTarget;
/** @type {number} */ Event.prototype.screenX;
/** @type {number} */ Event.prototype.screenY;
/** @type {boolean} */ Event.prototype.shiftKey;
/** @type {Window} */ Event.prototype.view;
/** @type {number} */ Event.prototype.which;
/** @type {Object} */ Event.prototype.state;
/** @constructor */ function nsIDOMPageTransitionEvent() {}
/** @type {boolean} */ nsIDOMPageTransitionEvent.prototype.persisted;
//Methods
Event.prototype.initKeyEvent;
Event.prototype.initMouseEvent;
Event.prototype.initUIEvent;
Event.prototype.initMessageEvent;
Event.prototype.preventBubble;
Event.prototype.preventCapture;

View File

@ -0,0 +1,78 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over some of the
* W3C's XML specifications by Gecko. This file depends on
* w3c_xml.js. The whole file has been fully type annotated.
*
* @externs
*/
/**
* XMLSerializer can be used to convert DOM subtree or DOM document into text.
* XMLSerializer is available to unprivileged scripts.
*
* XMLSerializer is mainly useful for applications and extensions based on
* Mozilla platform. While it's available to web pages, it's not part of any
* standard and level of support in other browsers is unknown.
*
* @constructor
*/
function XMLSerializer() {}
/**
* Returns the serialized subtree in the form of a string
* @param {Node} subtree
* @return {string}
*/
XMLSerializer.prototype.serializeToString = function(subtree) {};
/**
* The subtree rooted by the specified element is serialized to a byte stream
* using the character set specified.
*
* @param {Node} subtree
* @return {Object}
*/
XMLSerializer.prototype.serializeToStream = function(subtree) {};
/**
* DOMParser is mainly useful for applications and extensions based on Mozilla
* platform. While it's available to web pages, it's not part of any standard and
* level of support in other browsers is unknown.
*
* @constructor
*/
function DOMParser() {}
/**
* The string passed in is parsed into a DOM document.
*
* Example:
* var parser = new DOMParser();
* var doc = parser.parseFromString(aStr, "text/xml");
*
* @param {string} src The UTF16 string to be parsed.
* @param {string} type The content type of the string.
* @return {Document}
*/
DOMParser.prototype.parseFromString = function(src, type) {};
/**
* @type {function(new:DOMParser)}
*/
Window.prototype.DOMParser = function() {};

View File

@ -0,0 +1,30 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Declaration of the type level google namespace.
* @externs
* @author nicksantos@google.com (Nick Santos)
*/
/**
* Suppresses the compiler warning when multiple externs files declare the
* google namespace.
* @suppress {duplicate}
* @noalias
*/
// TODO(nicksantos): Consolidate to one google namespace declaration.
var google = {};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,261 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for IE's custom CSS properties, as defined here:
* http://msdn.microsoft.com/en-us/library/aa768661(VS.85).aspx
*
* This page is also useful for the IDL definitions:
* http://source.winehq.org/source/include/mshtml.idl
*
* @externs
* @author nicksantos@google.com
*/
/** @type {Element} */
StyleSheet.prototype.owningElement;
/** @type {boolean} */
StyleSheet.prototype.readOnly;
/** @type {StyleSheetList} */
StyleSheet.prototype.imports;
/** @type {string} */
StyleSheet.prototype.id;
/**
* @param {string} bstrURL
* @param {number} lIndex
* @return {number}
*/
StyleSheet.prototype.addImport;
/**
* @param {string} bstrSelector
* @param {string} bstrStyle
* @param {number=} opt_iIndex
* @return {number}
* @see http://msdn.microsoft.com/en-us/library/aa358796%28v=vs.85%29.aspx
*/
StyleSheet.prototype.addRule;
/**
* @param {number} lIndex
*/
StyleSheet.prototype.removeImport;
/**
* @param {number} lIndex
*/
StyleSheet.prototype.removeRule;
/** @type {string} */
StyleSheet.prototype.cssText;
/** @type {CSSRuleList} */
StyleSheet.prototype.rules;
// StyleSheet methods
/**
* @param {string} propName
* @return {string}
* @see http://msdn.microsoft.com/en-us/library/aa358797(VS.85).aspx
*/
StyleSheet.prototype.getExpression;
/**
* @param {string} name
* @param {string} expression
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/ms531196(VS.85).aspx
*/
StyleSheet.prototype.setExpression;
/**
* @param {string} expression
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/aa358798(VS.85).aspx
*/
StyleSheet.prototype.removeExpression;
// IE-only CSS style names.
/** @type {string} */ CSSProperties.prototype.backgroundPositionX;
/** @type {string} */ CSSProperties.prototype.backgroundPositionY;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms533883.aspx
*/
CSSProperties.prototype.imeMode;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms534176(VS.85).aspx
*/
CSSProperties.prototype.msInterpolationMode;
/** @type {string} */ CSSProperties.prototype.overflowX;
/** @type {string} */ CSSProperties.prototype.overflowY;
/** @type {number} */ CSSProperties.prototype.pixelWidth;
/** @type {number} */ CSSProperties.prototype.pixelHeight;
/** @type {number} */ CSSProperties.prototype.pixelLeft;
/** @type {number} */ CSSProperties.prototype.pixelTop;
/** @type {string} */ CSSProperties.prototype.styleFloat;
/**
* @type {string|number}
* @see http://msdn.microsoft.com/en-us/library/ms535169(VS.85).aspx
*/
CSSProperties.prototype.zoom;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/ms535153(VS.85).aspx
*/
CSSProperties.prototype.writingMode;
/**
* IE-specific extensions.
* @see http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx
*/
/** @type {string} */
CSSProperties.prototype.MsAccelerator;
/** @type {string} */
CSSProperties.prototype.MsBackgroundPositionX;
/** @type {string} */
CSSProperties.prototype.MsBackgroundPositionY;
/** @type {string} */
CSSProperties.prototype.MsBehavior;
/** @type {string} */
CSSProperties.prototype.MsBlockProgression;
/** @type {string} */
CSSProperties.prototype.MsFilter;
/** @type {string} */
CSSProperties.prototype.MsImeMode;
/** @type {string} */
CSSProperties.prototype.MsLayoutGrid;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridChar;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridLine;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridMode;
/** @type {string} */
CSSProperties.prototype.MsLayoutGridType;
/** @type {string} */
CSSProperties.prototype.MsLineBreak;
/** @type {string} */
CSSProperties.prototype.MsLineGridMode;
/** @type {string} */
CSSProperties.prototype.MsInterpolationMode;
/** @type {string} */
CSSProperties.prototype.MsOverflowX;
/** @type {string} */
CSSProperties.prototype.MsOverflowY;
/** @type {string} */
CSSProperties.prototype.MsScrollbar3dlightColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarArrowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarBaseColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarDarkshadowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarFaceColor;
CSSProperties.prototype.MsScrollbarHighlightColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarShadowColor;
/** @type {string} */
CSSProperties.prototype.MsScrollbarTrackColor;
/** @type {string} */
CSSProperties.prototype.MsTextAlignLast;
/** @type {string} */
CSSProperties.prototype.MsTextAutospace;
/** @type {string} */
CSSProperties.prototype.MsTextJustify;
/** @type {string} */
CSSProperties.prototype.MsTextKashidaSpace;
/** @type {string} */
CSSProperties.prototype.MsTextOverflow;
/** @type {string} */
CSSProperties.prototype.MsTextUnderlinePosition;
/** @type {string} */
CSSProperties.prototype.MsWordBreak;
/** @type {string} */
CSSProperties.prototype.MsWordWrap;
/** @type {string} */
CSSProperties.prototype.MsWritingMode;
/** @type {string} */
CSSProperties.prototype.MsZoom;
// See: http://msdn.microsoft.com/en-us/library/windows/apps/Hh702466.aspx
/** @type {string} */
CSSProperties.prototype.msContentZooming;
/** @type {string} */
CSSProperties.prototype.msTouchAction;
/** @type {string} */
CSSProperties.prototype.msTransform;
/** @type {string} */
CSSProperties.prototype.msTransition;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,302 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over the
* W3C's event specification by IE in JScript. This file depends on
* w3c_event.js.
*
* @see http://msdn.microsoft.com/en-us/library/ms535863.aspx
* @externs
*/
/** @type {string} */
Event.prototype.Abstract;
/** @type {boolean} */
Event.prototype.altKey;
/** @type {boolean} */
Event.prototype.altLeft;
/** @type {string} */
Event.prototype.Banner;
/** @type {number} */
Event.prototype.button;
/** @type {boolean} */
Event.prototype.cancelBubble;
/** @type {number} */
Event.prototype.clientX;
/** @type {number} */
Event.prototype.clientY;
/**
* @see http://msdn.microsoft.com/en-us/library/ms535220.aspx
* @type {(ClipboardData|undefined)}
*/
Event.prototype.clipboardData;
/** @type {boolean} */
Event.prototype.contentOverflow;
/** @type {boolean} */
Event.prototype.ctrlKey;
/** @type {boolean} */
Event.prototype.ctrlLeft;
/** @type {string} */
Event.prototype.data;
/** @type {string} */
Event.prototype.dataFld;
Event.prototype.domain;
/** @type {Element} */
Event.prototype.fromElement;
/** @type {number} */
Event.prototype.keyCode;
/** @type {string} */
Event.prototype.MoreInfo;
/** @type {string} */
Event.prototype.nextPage;
/** @type {number} */
Event.prototype.offsetX;
/** @type {number} */
Event.prototype.offsetY;
/** @type {string} */
Event.prototype.propertyName;
/** @type {string} */
Event.prototype.qualifier;
/** @type {number} */
Event.prototype.reason;
/** @type {Object.<*,*>} */
Event.prototype.recordset;
/** @type {boolean} */
Event.prototype.repeat;
/** @type {(boolean|string|undefined)} */
Event.prototype.returnValue;
/** @type {string} */
Event.prototype.saveType;
Event.prototype.scheme;
/** @type {number} */
Event.prototype.screenX;
/** @type {number} */
Event.prototype.screenY;
/** @type {boolean} */
Event.prototype.shiftKey;
/** @type {boolean} */
Event.prototype.shiftLeft;
/** @type {Window} */
Event.prototype.source;
/** @type {Element} */
Event.prototype.srcElement;
Event.prototype.srcFilter;
/** @type {string} */
Event.prototype.srcUrn;
/** @type {Element} */
Event.prototype.toElement;
Event.prototype.userName;
/** @type {number} */
Event.prototype.wheelDelta;
/** @type {number} */
Event.prototype.x;
/** @type {number} */
Event.prototype.y;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441257.aspx
*/
function MSPointerPoint() {}
/** @type {number} */
MSPointerPoint.prototype.pointerId;
/** @type {number} */
MSPointerPoint.prototype.pointerType;
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441233.aspx
*/
function MSPointerEvent() {}
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_MOUSE;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_PEN;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_TOUCH;
/** @type {number} */
MSPointerEvent.prototype.pointerId;
/** @type {number} */
MSPointerEvent.prototype.pointerType;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {boolean} ctrlKeyArg
* @param {boolean} altKeyArg
* @param {boolean} shiftKeyArg
* @param {boolean} metaKeyArg
* @param {number} buttonArg
* @param {Element} relatedTargetArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} widthArg
* @param {number} heightArg
* @param {number} pressure
* @param {number} rotation
* @param {number} tiltX
* @param {number} tiltY
* @param {number} pointerIdArg
* @param {number} pointerType
* @param {number} hwTimestampArg
* @param {boolean} isPrimary
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441246.aspx
*/
MSPointerEvent.prototype.initPointerEvent;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/ie/hh968249(v=vs.85).aspx
*/
function MSGesture() {}
/**
* @type {Element}
*/
MSGesture.prototype.target;
/**
* @param {number} pointerId
*/
MSGesture.prototype.addPointer = function(pointerId) {};
MSGesture.prototype.stop = function() {};
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/ie/hh772076(v=vs.85).aspx
*/
function MSGestureEvent() {}
/** @type {number} */
MSGestureEvent.prototype.expansion;
/** @type {!MSGesture} */
MSGestureEvent.prototype.gestureObject;
/** @type {number} */
MSGestureEvent.prototype.hwTimestamp;
/** @type {number} */
MSGestureEvent.prototype.rotation;
/** @type {number} */
MSGestureEvent.prototype.scale;
/** @type {number} */
MSGestureEvent.prototype.translationX;
/** @type {number} */
MSGestureEvent.prototype.translationY;
/** @type {number} */
MSGestureEvent.prototype.velocityAngular;
/** @type {number} */
MSGestureEvent.prototype.velocityExpansion;
/** @type {number} */
MSGestureEvent.prototype.velocityX;
/** @type {number} */
MSGestureEvent.prototype.velocityY;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} translationXArg
* @param {number} translationYArg
* @param {number} scaleArg
* @param {number} expansionArg
* @param {number} rotationArg
* @param {number} velocityXArg
* @param {number} velocityYArg
* @param {number} velocityExpansionArg
* @param {number} velocityAngularArg
* @param {number} hwTimestampArg
* @param {EventTarget} relatedTargetArg
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441187.aspx
*/
MSGestureEvent.prototype.initGestureEvent;

View File

@ -0,0 +1,77 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for IE's vector markup language, or VML.
*
* @externs
* @author robbyw@google.com (Robby Walker)
*/
/**
* @type {Object|string}
* @see http://msdn.microsoft.com/en-us/library/bb263836(VS.85).aspx
*/
Element.prototype.coordorigin;
/**
* @type {Object|string}
* @see http://msdn.microsoft.com/en-us/library/bb263837(VS.85).aspx
*/
Element.prototype.coordsize;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263839(VS.85).aspx
*/
Element.prototype.fillcolor;
/**
* @type {boolean}
* @see http://msdn.microsoft.com/en-us/library/bb263840(VS.85).aspx
*/
Element.prototype.filled;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263871(VS.85).aspx
*/
Element.prototype.path;
/**
* @type {number|string}
* @see http://msdn.microsoft.com/en-us/library/bb263877(VS.85).aspx
*/
Element.prototype.rotation;
/**
* @type {string}
* @see http://msdn.microsoft.com/en-us/library/bb263881(VS.85).aspx
*/
Element.prototype.strokecolor;
/**
* @type {boolean}
* @see http://msdn.microsoft.com/en-us/library/bb263882(VS.85).aspx
*/
Element.prototype.stroked;
/**
* @type {number|string}
* @see http://msdn.microsoft.com/en-us/library/bb263883(VS.85).aspx
*/
Element.prototype.strokeweight;

View File

@ -0,0 +1,362 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all iPhone extensions. Created from:
* http://developer.apple.com/library/safari/navigation/
*
* @externs
* @author agrieve@google.com (Andrew Grieve)
*/
/**
* The Touch class represents a single touch on the surface. A touch is the
* presence or movement of a finger that is part of a unique multi-touch
* sequence.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchClassReference/Touch/Touch.html
* @constructor
*/
function Touch() {}
/**
* The x-coordinate of the touch's location relative to the window's viewport.
* @type {number}
*/
Touch.prototype.clientX;
/**
* The y-coordinate of the touch's location relative to the window's viewport.
* @type {number}
*/
Touch.prototype.clientY;
/**
* The unique identifier for this touch object.
* @type {number}
*/
Touch.prototype.identifier;
/**
* The x-coordinate of the touch's location in page coordinates.
* @type {number}
*/
Touch.prototype.pageX;
/**
* The y-coordinate of the touch's location in page coordinates.
* @type {number}
*/
Touch.prototype.pageY;
/**
* The x-coordinate of the touch's location in screen coordinates.
* @type {number}
*/
Touch.prototype.screenX;
/**
* The y-coordinate of the touch's location in screen coordinates.
* @type {number}
*/
Touch.prototype.screenY;
/**
* The target of this touch.
* @type {EventTarget}
*/
Touch.prototype.target;
/**
* Creates a new Touch object.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html#//apple_ref/javascript/instm/Document/createTouch
* @param {Window} view
* @param {EventTarget} target
* @param {number} identifier
* @param {number} pageX
* @param {number} pageY
* @param {number} screenX
* @param {number} screenY
* @return {Touch}
*/
Document.prototype.createTouch = function(view, target, identifier, pageX,
pageY, screenX, screenY) {};
/**
* The TouchList class is used to represent a collection of Touch objects.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchListClassReference/TouchList/TouchList.html
* @constructor
*/
function TouchList() {}
/**
* The number of Touch objects in this TouchList object.
* @type {number}
*/
TouchList.prototype.length;
/**
* Returns the Touch object at the given index.
* @param {number} index
* @return {!Touch}
*/
TouchList.prototype.item = function(index) {};
/**
* Creates a new TouchList object.
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html#//apple_ref/javascript/instm/Document/createTouchList
* @param {Array.<Touch>} touches
* @return {TouchList}
*/
Document.prototype.createTouchList = function(touches) {};
/**
* The TouchEvent class encapsulates information about a touch event.
*
* <p>The system continually sends TouchEvent objects to an application as
* fingers touch and move across a surface. A touch event provides a snapshot of
* all touches during a multi-touch sequence, most importantly the touches that
* are new or have changed for a particular target. A multi-touch sequence
* begins when a finger first touches the surface. Other fingers may
* subsequently touch the surface, and all fingers may move across the surface.
* The sequence ends when the last of these fingers is lifted from the surface.
* An application receives touch event objects during each phase of any touch.
* </p>
*
* <p>The different types of TouchEvent objects that can occur are:
* <ul>
* <li>touchstart - Sent when a finger for a given event touches the surface.
* <li>touchmove - Sent when a given event moves on the surface.
* <li>touchend - Sent when a given event lifts from the surface.
* <li>touchcancel - Sent when the system cancels tracking for the touch.
* </ul>
* TouchEvent objects are combined together to form high-level GestureEvent
* objects that are also sent during a multi-touch sequence.</p>
*
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/TouchEventClassReference/TouchEvent/TouchEvent.html
* @extends {UIEvent}
* @constructor
*/
function TouchEvent() {}
/**
* A collection of Touch objects representing all touches associated with this
* target.
* @type {TouchList}
*/
TouchEvent.prototype.touches;
/**
* A collection of Touch objects representing all touches associated with this
* target.
* @type {TouchList}
*/
TouchEvent.prototype.targetTouches;
/**
* A collection of Touch objects representing all touches that changed in this event.
* @type {TouchList}
*/
TouchEvent.prototype.changedTouches;
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
TouchEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
TouchEvent.prototype.rotation;
/**
* Initializes a newly created TouchEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {TouchList} touches
* @param {TouchList} targetTouches
* @param {TouchList} changedTouches
* @param {number} scale
* @param {number} rotation
*/
TouchEvent.prototype.initTouchEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, touches, targetTouches, changedTouches, scale, rotation) {};
/**
* The GestureEvent class encapsulates information about a multi-touch gesture.
*
* GestureEvent objects are high-level events that encapsulate the low-level
* TouchEvent objects. Both GestureEvent and TouchEvent events are sent during
* a multi-touch sequence. Gesture events contain scaling and rotation
* information allowing gestures to be combined, if supported by the platform.
* If not supported, one gesture ends before another starts. Listen for
* GestureEvent events if you want to respond to gestures only, not process
* the low-level TouchEvent objects.
*
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html
* @extends {UIEvent}
* @constructor
*/
function GestureEvent() {}
/**
* The distance between two fingers since the start of an event as a multiplier
* of the initial distance. The initial value is 1.0. If less than 1.0, the
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
* pinch open (to zoom in).
* @type {number}
*/
GestureEvent.prototype.scale;
/**
* The delta rotation since the start of an event, in degrees, where clockwise
* is positive and counter-clockwise is negative. The initial value is 0.0.
* @type {number}
*/
GestureEvent.prototype.rotation;
/**
* The target of this gesture.
* @type {EventTarget}
*/
GestureEvent.prototype.target;
/**
* Initializes a newly created GestureEvent object.
* @param {string} type
* @param {boolean} canBubble
* @param {boolean} cancelable
* @param {Window} view
* @param {number} detail
* @param {number} screenX
* @param {number} screenY
* @param {number} clientX
* @param {number} clientY
* @param {boolean} ctrlKey
* @param {boolean} altKey
* @param {boolean} shiftKey
* @param {boolean} metaKey
* @param {EventTarget} target
* @param {number} scale
* @param {number} rotation
*/
GestureEvent.prototype.initGestureEvent = function(type, canBubble, cancelable,
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, target, scale, rotation) {};
/**
* Specifies the JavaScript method to invoke when the system cancels tracking
* for the touch.
* @param {!TouchEvent} e
*/
Element.prototype.ontouchcancel = function(e) {};
/**
* Specifies the JavaScript method to invoke when a given event lifts from the
* surface.
* @param {!TouchEvent} e
*/
Element.prototype.ontouchend = function(e) {};
/**
* Specifies the JavaScript method to invoke when a finger for a given event
* moves on the surface.
* @param {!TouchEvent} e
*/
Element.prototype.ontouchmove = function(e) {};
/**
* Specifies the JavaScript method to invoke when a finger for a given event
* touches the surface.
* @param {!TouchEvent} e
*/
Element.prototype.ontouchstart = function(e) {};
/**
* Specifies the JavaScript method to invoke when a gesture is started by
* two or more fingers touching the surface.
* @param {!GestureEvent} e
*/
Element.prototype.ongesturestart = function(e) {};
/**
* Specifies the JavaScript method to invoke when fingers are moved during a
* gesture.
* @param {!GestureEvent} e
*/
Element.prototype.ongesturechange = function(e) {};
/**
* Specifies the JavaScript method to invoke when a gesture ends (when there are
* 0 or 1 fingers touching the surface).
* @param {!GestureEvent} e
*/
Element.prototype.ongestureend = function(e) {};
/**
* Specifies the JavaScript method to invoke when the browser device's
* orientation changes, i.e.the device is rotated.
* @param {Event} e
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.onorientationchange = function(e) {};
/**
* Returns the orientation of the browser's device, one of [-90, 0, 90, 180].
* @type {number}
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
*/
Window.prototype.orientation;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLInputElement.prototype.autocapitalize;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocorrect;
/**
* @implicitCast
* @type {boolean}
*/
HTMLTextAreaElement.prototype.autocapitalize;

View File

@ -0,0 +1,191 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for timing control for script base animations. The
* whole file has been fully type annotated.
*
* @see http://www.w3.org/TR/animation-timing/
* @see http://webstuff.nfshost.com/anim-timing/Overview.html
* @externs
*/
/**
* @param {function(number)} callback
* @param {Element=} opt_element In early versions of this API, the callback
* was invoked only if the element was visible.
* @return {number}
*/
function requestAnimationFrame(callback, opt_element) {};
/**
* @param {number} handle
*/
function cancelRequestAnimationFrame(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
function webkitRequestAnimationFrame(callback, opt_element) {};
/**
* @param {number} handle
*/
function webkitCancelRequestAnimationFrame(handle) {};
/**
* @param {number} handle
*/
function webkitCancelAnimationFrame(handle) {};
/**
* @param {?function(number)} callback It's legitimate to pass a null
* callback and listen on the MozBeforePaint event instead.
* @param {Element=} opt_element
* @return {number}
*/
function mozRequestAnimationFrame(callback, opt_element) {};
/**
* @param {number} handle
*/
function mozCancelRequestAnimationFrame(handle) {};
/**
* @param {number} handle
*/
function mozCancelAnimationFrame(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
function msRequestAnimationFrame(callback, opt_element) {};
/**
* @param {number} handle
*/
function msCancelRequestAnimationFrame(handle) {};
/**
* @param {number} handle
*/
function msCancelAnimationFrame(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
function oRequestAnimationFrame(callback, opt_element) {};
/**
* @param {number} handle
*/
function oCancelRequestAnimationFrame(handle) {};
/**
* @param {number} handle
*/
function oCancelAnimationFrame(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
Window.prototype.requestAnimationFrame = function(callback, opt_element) {};
/**
* @param {number} handle
*/
Window.prototype.cancelRequestAnimationFrame = function(handle) {};
/**
* @param {number} handle
*/
Window.prototype.cancelAnimationFrame = function(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
Window.prototype.webkitRequestAnimationFrame = function(callback, opt_element) {};
/**
* @param {number} handle
*/
Window.prototype.webkitCancelRequestAnimationFrame = function(handle) {};
/**
* @param {number} handle
*/
Window.prototype.webkitCancelAnimationFrame = function(handle) {};
/**
* @param {?function(number)} callback It's legitimate to pass a null
* callback and listen on the MozBeforePaint event instead.
* @param {Element=} opt_element
* @return {number}
*/
Window.prototype.mozRequestAnimationFrame = function(callback, opt_element) {};
/**
* @param {number} handle
*/
Window.prototype.mozCancelRequestAnimationFrame = function(handle) {};
/**
* @param {number} handle
*/
Window.prototype.mozCancelAnimationFrame = function(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
Window.prototype.msRequestAnimationFrame = function(callback, opt_element) {};
/**
* @param {number} handle
*/
Window.prototype.msCancelRequestAnimationFrame = function(handle) {};
/**
* @param {number} handle
*/
Window.prototype.msCancelAnimationFrame = function(handle) {};
/**
* @param {function(number)} callback
* @param {Element=} opt_element
* @return {number}
*/
Window.prototype.oRequestAnimationFrame = function(callback, opt_element) {};
/**
* @param {number} handle
*/
Window.prototype.oCancelRequestAnimationFrame = function(handle) {};
/**
* @param {number} handle
*/
Window.prototype.oCancelAnimationFrame = function(handle) {};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,199 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's CSS 3D Transforms specification.
* The whole file has been fully type annotated. Created from
* http://www.w3.org/TR/css3-3d-transforms/
*
* @externs
*/
/**
* @constructor
* @param {string} matrix
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
function CSSMatrix(matrix) {}
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m11;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m12;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m13;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m14;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m21;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m22;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m23;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m24;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m31;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m32;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m33;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m34;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m41;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m42;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m43;
/**
* @type {number}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.m44;
/**
* @param {string} string
* @return {void}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.setMatrixValue = function(string) {};
/**
* @param {CSSMatrix} secondMatrix
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.multiply = function(secondMatrix) {};
/**
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.inverse = function() {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.translate = function(x, y, z) {};
/**
* @param {number} scaleX
* @param {number} scaleY
* @param {number} scaleZ
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.scale = function(scaleX, scaleY, scaleZ) {};
/**
* @param {number} rotX
* @param {number} rotY
* @param {number} rotZ
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.rotate = function(rotX, rotY, rotZ) {};
/**
* @param {number} x
* @param {number} y
* @param {number} z
* @param {number} angle
* @return {CSSMatrix}
* @see http://www.w3.org/TR/css3-3d-transforms/#cssmatrix-interface
*/
CSSMatrix.prototype.rotateAxisAngle = function(x, y, z, angle) {};
/**
* @constructor
* @param {string} matrix
* @extends {CSSMatrix}
* @see http://developer.apple.com/safari/library/documentation/AudioVideo/Reference/WebKitCSSMatrixClassReference/WebKitCSSMatrix/WebKitCSSMatrix.html#//apple_ref/javascript/instm/WebKitCSSMatrix/setMatrixValue
*/
function WebKitCSSMatrix(matrix) {}
/**
* @constructor
* @param {string} matrix
* @extends {CSSMatrix}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh453593.aspx
*/
function MSCSSMatrix(matrix) {}

View File

@ -0,0 +1,853 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's DOM Level 1 specification.
* The whole file has been fully type annotated. Created from
* http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
*
* @externs
*/
/**
* @constructor
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-17189187
*/
function DOMException() {}
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.INDEX_SIZE_ERR = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.DOMSTRING_SIZE_ERR = 2;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.HIERARCHY_REQUEST_ERR = 3;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.WRONG_DOCUMENT_ERR = 4;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.INVALID_CHARACTER_ERR = 5;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.NO_DATA_ALLOWED_ERR = 6;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.NO_MODIFICATION_ALLOWED_ERR = 7;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.NOT_FOUND_ERR = 8;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.NOT_SUPPORTED_ERR = 9;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
DOMException.INUSE_ATTRIBUTE_ERR = 10;
/**
* @constructor
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
*/
function ExceptionCode() {}
/**
* @constructor
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-102161490
*/
function DOMImplementation() {}
/**
* @param {string} feature
* @param {string} version
* @return {boolean}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5CED94D7
* @nosideeffects
*/
DOMImplementation.prototype.hasFeature = function(feature, version) {};
/**
* @constructor
* @implements {EventTarget}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
function Node() {}
/** @override */
Node.prototype.addEventListener = function(type, listener, useCapture) {};
/** @override */
Node.prototype.removeEventListener = function(type, listener, useCapture) {};
/** @override */
Node.prototype.dispatchEvent = function(evt) {};
/**
* @type {NamedNodeMap}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-attributes
*/
Node.prototype.attributes;
/**
* @type {!NodeList}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-childNodes
*/
Node.prototype.childNodes;
/**
* @type {Node?}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-firstChild
*/
Node.prototype.firstChild;
/**
* @type {Node?}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-lastChild
*/
Node.prototype.lastChild;
/**
* @type {Node?}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nextSibling
*/
Node.prototype.nextSibling;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeName
*/
Node.prototype.nodeName;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeValue
*/
Node.prototype.nodeValue;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeType
*/
Node.prototype.nodeType;
/**
* @type {Document}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-ownerDocument
*/
Node.prototype.ownerDocument;
/**
* @type {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-parentNode
*/
Node.prototype.parentNode;
/**
* @type {Node?}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-previousSibling
*/
Node.prototype.previousSibling;
/**
* @param {Node} newChild
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-appendChild
*/
Node.prototype.appendChild = function(newChild) {};
/**
* @param {boolean} deep
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-cloneNode
* @nosideeffects
*/
Node.prototype.cloneNode = function(deep) {};
/**
* @return {boolean}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-hasChildNodes
* @nosideeffects
*/
Node.prototype.hasChildNodes = function() {};
/**
* @param {Node} newChild
* @param {Node?} refChild
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-insertBefore
*/
Node.prototype.insertBefore = function(newChild, refChild) {};
/**
* @param {Node} oldChild
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeChild
*/
Node.prototype.removeChild = function(oldChild) {};
/**
* @param {Node} newChild
* @param {Node} oldChild
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-replaceChild
*/
Node.prototype.replaceChild = function(newChild, oldChild) {};
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.ATTRIBUTE_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.CDATA_SECTION_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.COMMENT_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.DOCUMENT_FRAGMENT_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.DOCUMENT_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.DOCUMENT_TYPE_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.ELEMENT_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.ENTITY_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.ENTITY_REFERENCE_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.PROCESSING_INSTRUCTION_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.TEXT_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.XPATH_NAMESPACE_NODE;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
*/
Node.NOTATION_NODE;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-B63ED1A3
*/
function DocumentFragment() {}
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document
*/
function Document() {}
/**
* @type {DocumentType}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-doctype
*/
Document.prototype.doctype;
/**
* @type {!Element}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-documentElement
*/
Document.prototype.documentElement;
/**
* @type {DOMImplementation}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-implementation
*/
Document.prototype.implementation;
/**
* @param {string} name
* @return {!Attr}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createAttribute
* @nosideeffects
*/
Document.prototype.createAttribute = function(name) {};
/**
* @param {string} data
* @return {!Comment}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createComment
* @nosideeffects
*/
Document.prototype.createComment = function(data) {};
/**
* @param {string} data
* @return {!CDATASection}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createCDATASection
* @nosideeffects
*/
Document.prototype.createCDATASection = function(data) {};
/**
* @return {!DocumentFragment}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createDocumentFragment
* @nosideeffects
*/
Document.prototype.createDocumentFragment = function() {};
/**
* Create a DOM element. Surprisingly, this has side-effects on IE
* (creating and element with a custom tag boots up a sub-system that
* handles custom tags).
* @param {string} tagName
* @return {!Element}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement
*/
Document.prototype.createElement = function(tagName) {};
/**
* @param {string} name
* @return {!EntityReference}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createEntityReference
* @nosideeffects
*/
Document.prototype.createEntityReference = function(name) {};
/**
* @param {string} target
* @param {string} data
* @return {!ProcessingInstruction}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createProcessingInstruction
* @nosideeffects
*/
Document.prototype.createProcessingInstruction = function(target, data) {};
/**
* @param {string} data
* @return {!Text}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createTextNode
* @nosideeffects
*/
Document.prototype.createTextNode = function(data) {};
/**
* @param {string} tagname
* @return {!NodeList}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-A6C9094
* @nosideeffects
*/
Document.prototype.getElementsByTagName = function(tagname) {};
/**
* @constructor
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177
*/
function NodeList() {}
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-203510337
*/
NodeList.prototype.length;
/**
* @param {number} index
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-844377136
*/
NodeList.prototype.item = function(index) {};
/**
* @constructor
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1780488922
*/
function NamedNodeMap() {}
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6D0FB19E
*/
NamedNodeMap.prototype.length;
/**
* @param {string} name
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1074577549
* @nosideeffects
*/
NamedNodeMap.prototype.getNamedItem = function(name) {};
/**
* @param {number} index
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-349467F9
* @nosideeffects
*/
NamedNodeMap.prototype.item = function(index) {};
/**
* @param {string} name
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D58B193
*/
NamedNodeMap.prototype.removeNamedItem = function(name) {};
/**
* @param {Node} arg
* @return {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1025163788
*/
NamedNodeMap.prototype.setNamedItem = function(arg) {};
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-FF21A306
*/
function CharacterData() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-72AB8359
*/
CharacterData.prototype.data;
/**
* @type {number}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7D61178C
*/
CharacterData.prototype.length;
/**
* @param {string} arg
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-32791A2F
*/
CharacterData.prototype.appendData = function(arg) {};
/**
* @param {number} offset
* @param {number} count
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7C603781
*/
CharacterData.prototype.deleteData = function(offset, count) {};
/**
* @param {number} offset
* @param {string} arg
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-3EDB695F
*/
CharacterData.prototype.insertData = function(offset, arg) {};
/**
* @param {number} offset
* @param {number} count
* @param {string} arg
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E5CBA7FB
*/
CharacterData.prototype.replaceData = function(offset, count, arg) {};
/**
* @param {number} offset
* @param {number} count
* @return {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6531BCCF
* @nosideeffects
*/
CharacterData.prototype.substringData = function(offset, count) {};
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-637646024
*/
function Attr() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1112119403
*/
Attr.prototype.name;
/**
* @type {boolean}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-862529273
*/
Attr.prototype.specified;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-221662474
*/
Attr.prototype.value;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614
*/
function Element() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-tagName
*/
Element.prototype.tagName;
/**
* @param {string} name
* @param {number?=} opt_flags
* @return {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttribute
* @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
* @nosideeffects
*/
Element.prototype.getAttribute = function(name, opt_flags) {};
/**
* @param {string} name
* @return {Attr}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttributeNode
* @nosideeffects
*/
Element.prototype.getAttributeNode = function(name) {};
/**
* @param {string} tagname
* @return {!NodeList}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1938918D
* @nosideeffects
*/
Element.prototype.getElementsByTagName = function(tagname) {};
/**
* @param {string} name
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttribute
*/
Element.prototype.removeAttribute = function(name) {};
/**
* @param {Attr} oldAttr
* @return {?Attr}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttributeNode
*/
Element.prototype.removeAttributeNode = function(oldAttr) {};
/**
* @param {string} name
* @param {string|number|boolean} value Values are converted to strings with
* ToString, so we accept number and boolean since both convert easily to
* strings.
* @return {undefined}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttribute
*/
Element.prototype.setAttribute = function(name, value) {};
/**
* @param {Attr} newAttr
* @return {?Attr}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttributeNode
*/
Element.prototype.setAttributeNode = function(newAttr) {};
// Event handlers
// The DOM level 3 spec has a good index of these
// http://www.w3.org/TR/DOM-Level-3-Events/#event-types
/** @type {?function (Event)} */ Element.prototype.onabort;
/** @type {?function (Event)} */ Element.prototype.onbeforeunload;
/** @type {?function (Event)} */ Element.prototype.onblur;
/** @type {?function (Event)} */ Element.prototype.onchange;
/** @type {?function (Event)} */ Element.prototype.onclick;
/** @type {?function (Event)} */ Element.prototype.oncompositionstart;
/** @type {?function (Event)} */ Element.prototype.oncompositionupdate;
/** @type {?function (Event)} */ Element.prototype.oncompositionend;
/** @type {?function (Event)} */ Element.prototype.oncontextmenu;
/** @type {?function (Event)} */ Element.prototype.oncopy;
/** @type {?function (Event)} */ Element.prototype.oncut;
/** @type {?function (Event)} */ Element.prototype.ondblclick;
/** @type {?function (Event)} */ Element.prototype.onerror;
/** @type {?function (Event)} */ Element.prototype.onfocus;
/** @type {?function (Event)} */ Element.prototype.onfocusin;
/** @type {?function (Event)} */ Element.prototype.onfocusout;
/** @type {?function (Event)} */ Element.prototype.onkeydown;
/** @type {?function (Event)} */ Element.prototype.onkeypress;
/** @type {?function (Event)} */ Element.prototype.onkeyup;
/** @type {?function (Event)} */ Element.prototype.onload;
/** @type {?function (Event)} */ Element.prototype.onunload;
/** @type {?function (Event)} */ Element.prototype.onmousedown;
/** @type {?function (Event)} */ Element.prototype.onmousemove;
/** @type {?function (Event)} */ Element.prototype.onmouseout;
/** @type {?function (Event)} */ Element.prototype.onmouseover;
/** @type {?function (Event)} */ Element.prototype.onmouseup;
/** @type {?function (Event)} */ Element.prototype.onmousewheel;
/** @type {?function (Event)} */ Element.prototype.onpaste;
/** @type {?function (Event)} */ Element.prototype.onreset;
/** @type {?function (Event)} */ Element.prototype.onresize;
/** @type {?function (Event)} */ Element.prototype.onscroll;
/** @type {?function (Event)} */ Element.prototype.onselect;
/** @type {?function (Event=)} */ Element.prototype.onsubmit;
/** @type {?function (Event)} */ Element.prototype.ontextinput;
/** @type {?function (Event)} */ Element.prototype.onwheel;
/**
* @constructor
* @extends {CharacterData}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772
*/
function Text() {}
/**
* @param {number} offset
* @return {Text}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-38853C1D
*/
Text.prototype.splitText = function(offset) {};
/**
* @constructor
* @extends {CharacterData}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1728279322
*/
function Comment() {}
/**
* @constructor
* @extends {Text}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-667469212
*/
function CDATASection() {}
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-412266927
*/
function DocumentType() {}
/**
* @type {NamedNodeMap}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1788794630
*/
DocumentType.prototype.entities;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1844763134
*/
DocumentType.prototype.name;
/**
* @type {NamedNodeMap}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D46829EF
*/
DocumentType.prototype.notations;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5431D1B9
*/
function Notation() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-54F2B4D0
*/
Notation.prototype.publicId;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E8AAB1D0
*/
Notation.prototype.systemId;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-527DCFF2
*/
function Entity() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7303025
*/
Entity.prototype.publicId;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7C29F3E
*/
Entity.prototype.systemId;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6ABAEB38
*/
Entity.prototype.notationName;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-11C98490
*/
function EntityReference() {}
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1004215813
*/
function ProcessingInstruction() {}
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-837822393
*/
ProcessingInstruction.prototype.data;
/**
* @type {string}
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1478689192
*/
ProcessingInstruction.prototype.target;
/**
* @constructor
* @implements {EventTarget}
*/
function Window() {}
/** @override */
Window.prototype.addEventListener = function(type, listener, useCapture) {};
/** @override */
Window.prototype.removeEventListener = function(type, listener, useCapture) {};
/** @override */
Window.prototype.dispatchEvent = function(evt) {};
/** @type {?function (Event)} */ Window.prototype.onabort;
/** @type {?function (Event)} */ Window.prototype.onbeforeunload;
/** @type {?function (Event)} */ Window.prototype.onblur;
/** @type {?function (Event)} */ Window.prototype.onchange;
/** @type {?function (Event)} */ Window.prototype.onclick;
/** @type {?function (Event)} */ Window.prototype.onclose;
/** @type {?function (Event)} */ Window.prototype.oncontextmenu;
/** @type {?function (Event)} */ Window.prototype.ondblclick;
/** @type {?function (Event)} */ Window.prototype.ondragdrop;
// onerror has a special signature.
// See https://developer.mozilla.org/en/DOM/window.onerror
// and http://msdn.microsoft.com/en-us/library/cc197053(VS.85).aspx
/** @type {?function (string, string, number)} */
Window.prototype.onerror;
/** @type {?function (Event)} */ Window.prototype.onfocus;
/** @type {?function (Event)} */ Window.prototype.onhashchange;
/** @type {?function (Event)} */ Window.prototype.onkeydown;
/** @type {?function (Event)} */ Window.prototype.onkeypress;
/** @type {?function (Event)} */ Window.prototype.onkeyup;
/** @type {?function (Event)} */ Window.prototype.onload;
/** @type {?function (Event)} */ Window.prototype.onmousedown;
/** @type {?function (Event)} */ Window.prototype.onmousemove;
/** @type {?function (Event)} */ Window.prototype.onmouseout;
/** @type {?function (Event)} */ Window.prototype.onmouseover;
/** @type {?function (Event)} */ Window.prototype.onmouseup;
/** @type {?function (Event)} */ Window.prototype.onmousewheel;
/** @type {?function (Event)} */ Window.prototype.onpaint;
/** @type {?function (Event)} */ Window.prototype.onpopstate;
/** @type {?function (Event)} */ Window.prototype.onreset;
/** @type {?function (Event)} */ Window.prototype.onresize;
/** @type {?function (Event)} */ Window.prototype.onscroll;
/** @type {?function (Event)} */ Window.prototype.onselect;
/** @type {?function (Event=)} */ Window.prototype.onsubmit;
/** @type {?function (Event)} */ Window.prototype.onunload;
/** @type {?function (Event)} */ Window.prototype.onwheel;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,854 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's DOM Level 3 specification.
* This file depends on w3c_dom2.js.
* The whole file has been fully type annotated.
* Created from
* http://www.w3.org/TR/DOM-Level-3-Core/ecma-script-binding.html
*
* @externs
*/
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF
*/
DOMException.prototype.code;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF
*/
DOMException.VALIDATION_ERR = 16;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-258A00AF
*/
DOMException.TYPE_MISMATCH_ERR = 17;
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
*/
function DOMStringList() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-length
*/
DOMStringList.prototype.length;
/**
* @param {string} str
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-contains
*/
DOMStringList.prototype.contains = function(str) {};
/**
* @param {number} index
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList-item
*/
DOMStringList.prototype.item = function(index) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList
*/
function NameList() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-length
*/
NameList.prototype.length;
/**
* @param {string} str
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-contains
* @nosideeffects
*/
NameList.prototype.contains = function(str) {};
/**
* @param {string} namespaceURI
* @param {string} name
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-containsNS
* @nosideeffects
*/
NameList.prototype.containsNS = function(namespaceURI, name) {};
/**
* @param {number} index
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getName
* @nosideeffects
*/
NameList.prototype.getName = function(index) {};
/**
* @param {number} index
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#NameList-getNamespaceURI
* @nosideeffects
*/
NameList.prototype.getNamespaceURI = function(index) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList
*/
function DOMImplementationList() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList-length
*/
DOMImplementationList.prototype.length;
/**
* @param {number} index
* @return {DOMImplementation}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationList-item
* @nosideeffects
*/
DOMImplementationList.prototype.item = function(index) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementationSource
*/
function DOMImplementationSource() {}
/**
* @param {string} namespaceURI
* @param {string} publicId
* @param {DocumentType} doctype
* @return {Document}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocument
* @nosideeffects
*/
DOMImplementation.prototype.createDocument = function(namespaceURI, publicId, doctype) {};
/**
* @param {string} qualifiedName
* @param {string} publicId
* @param {string} systemId
* @return {DocumentType}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-DOM-createDocType
* @nosideeffects
*/
DOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {};
/**
* @param {string} features
* @return {DOMImplementation}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-getDOMImpl
* @nosideeffects
*/
DOMImplementationSource.prototype.getDOMImplementation = function(features) {};
/**
* @param {string} features
* @return {DOMImplementationList}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-getDOMImpls
* @nosideeffects
*/
DOMImplementationSource.prototype.getDOMImplementationList = function(features) {};
/**
* @param {string} feature
* @param {string} version
* @return {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMImplementation3-getFeature
* @nosideeffects
*/
DOMImplementation.prototype.getFeature = function(feature, version) {};
/**
* @param {Node} externalNode
* @return {Node}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-adoptNode
*/
Document.prototype.adoptNode = function(externalNode) {};
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-documentURI
*/
Document.prototype.documentURI;
/**
* @type {DOMConfiguration}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-domConfig
*/
Document.prototype.domConfig;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-inputEncoding
*/
Document.prototype.inputEncoding;
/**
* @type {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-strictErrorChecking
*/
Document.prototype.strictErrorChecking;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-encoding
*/
Document.prototype.xmlEncoding;
/**
* @type {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-standalone
*/
Document.prototype.xmlStandalone;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-version
*/
Document.prototype.xmlVersion;
/**
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-normalizeDocument
*/
Document.prototype.normalizeDocument = function() {};
/**
* @param {Node} n
* @param {string} namespaceURI
* @param {string} qualifiedName
* @return {Node}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-renameNode
*/
Document.prototype.renameNode = function(n, namespaceURI, qualifiedName) {};
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-baseURI
*/
Node.prototype.baseURI;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSLocalN
*/
Node.prototype.localName;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSname
*/
Node.prototype.namespaceURI;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix
*/
Node.prototype.prefix;
/**
* @type {string}
* @implicitCast
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent
*/
Node.prototype.textContent;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_DISCONNECTED
*/
Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_PRECEDING
*/
Node.DOCUMENT_POSITION_PRECEDING = 0x02;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_FOLLOWING
*/
Node.DOCUMENT_POSITION_FOLLOWING = 0x04;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINS
*/
Node.DOCUMENT_POSITION_CONTAINS = 0x08;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_CONTAINED_BY
*/
Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node-DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
*/
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
/**
* @param {Node} other
* @return {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
* @nosideeffects
*/
Node.prototype.compareDocumentPosition = function(other) {};
/**
* @param {string} feature
* @param {string} version
* @return {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-getFeature
* @nosideeffects
*/
Node.prototype.getFeature = function(feature, version) {};
/**
* @param {string} key
* @return {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-getUserData
* @nosideeffects
*/
Node.prototype.getUserData = function(key) {};
/**
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeHasAttrs
* @nosideeffects
*/
Node.prototype.hasAttributes = function() {};
/**
* @param {string} namespaceURI
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace
* @nosideeffects
*/
Node.prototype.isDefaultNamespace = function(namespaceURI) {};
/**
* @param {Node} arg
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isEqualNode
* @nosideeffects
*/
Node.prototype.isEqualNode = function(arg) {};
/**
* @param {Node} other
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isSameNode
* @nosideeffects
*/
Node.prototype.isSameNode = function(other) {};
/**
* @param {string} feature
* @param {string} version
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-Node-supports
* @nosideeffects
*/
Node.prototype.isSupported = function(feature, version) {};
/**
* @param {string} prefix
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI
* @nosideeffects
*/
Node.prototype.lookupNamespaceURI = function(prefix) {};
/**
* @param {string} namespaceURI
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix
* @nosideeffects
*/
Node.prototype.lookupPrefix = function(namespaceURI) {};
/**
* @return undefined
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-normalize
*/
Node.prototype.normalize = function() {};
/**
* @param {Object} key
* @param {Object} data
* @param {UserDataHandler} handler
* @return {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-setUserData'
*/
Node.prototype.setUserData = function(key, data, handler) {};
/**
* @param {string} query
* @return {Node}
* @see http://www.w3.org/TR/selectors-api/#queryselector
* @nosideeffects
*/
Node.prototype.querySelector = function(query) {};
/**
* @param {string} query
* @return {!NodeList}
* @see http://www.w3.org/TR/selectors-api/#queryselectorall
* @nosideeffects
*/
Node.prototype.querySelectorAll = function(query) {};
/**
* @type {Element}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-ownerElement
*/
Attr.prototype.ownerElement;
/**
* @type {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-isId
*/
Attr.prototype.isId;
/**
* @type {TypeInfo}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-schemaTypeInfo
*/
Attr.prototype.schemaTypeInfo;
/**
* @type {TypeInfo}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Element-schemaTypeInfo
*/
Element.prototype.schemaTypeInfo;
/**
* @param {string} namespaceURI
* @param {string} localName
* @return {Attr}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElGetAtNodeNS
* @nosideeffects
*/
Element.prototype.getAttributeNodeNS = function(namespaceURI, localName) {};
/**
* @param {string} namespaceURI
* @param {string} localName
* @return {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElGetAttrNS
* @nosideeffects
*/
Element.prototype.getAttributeNS = function(namespaceURI, localName) {};
/**
* @param {string} namespaceURI
* @param {string} localName
* @return {!NodeList}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-A6C90942
* @nosideeffects
*/
Element.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {};
/**
* @param {string} name
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElHasAttr
* @nosideeffects
*/
Element.prototype.hasAttribute = function(name) {};
/**
* @param {string} namespaceURI
* @param {string} localName
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElHasAttrNS
* @nosideeffects
*/
Element.prototype.hasAttributeNS = function(namespaceURI, localName) {};
/**
* @param {string} namespaceURI
* @param {string} localName
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElRemAtNS
*/
Element.prototype.removeAttributeNS = function(namespaceURI, localName) {};
/**
* @param {Attr} newAttr
* @return {Attr}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetAtNodeNS
*/
Element.prototype.setAttributeNodeNS = function(newAttr) {};
/**
* @param {string} namespaceURI
* @param {string} qualifiedName
* @param {string|number|boolean} value Values are converted to strings with
* ToString, so we accept number and boolean since both convert easily to
* strings.
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetAttrNS
*/
Element.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {};
/**
* @param {string} name
* @param {boolean} isId
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttr
*/
Element.prototype.setIdAttribute = function(name, isId) {};
/**
* @param {Attr} idAttr
* @param {boolean} isId
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNode
*/
Element.prototype.setIdAttributeNode = function(idAttr, isId) {};
/**
* @param {string} namespaceURI
* @param {string} localName
* @param {boolean} isId
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ElSetIdAttrNS
*/
Element.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {};
/**
* @type {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-isElementContentWhitespace
* @nosideeffects
*/
Text.prototype.isElementContentWhitespace;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-wholeText
*/
Text.prototype.wholeText;
/**
* @param {string} newText
* @return {Text}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Text3-replaceWholeText
*/
Text.prototype.replaceWholeText = function(newText) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo
*/
function TypeInfo() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_EXTENSION
*/
TypeInfo.prototype.DERIVATION_EXTENSION;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_LIST
*/
TypeInfo.prototype.DERIVATION_LIST;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_RESTRICTION
*/
TypeInfo.prototype.DERIVATION_RESTRICTION;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-DERIVATION_UNION
*/
TypeInfo.prototype.DERIVATION_UNION;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeName
*/
TypeInfo.prototype.typeName;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-typeNamespace
*/
TypeInfo.prototype.typeNamespace;
/**
* @param {string} typeNamespaceArg
* @param {string} typeNameArg
* @param {number} derivationMethod
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom
* @nosideeffects
*/
TypeInfo.prototype.isDerivedFrom = function(typeNamespaceArg, typeNameArg, derivationMethod) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler
*/
function UserDataHandler() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-CLONED
*/
UserDataHandler.prototype.NODE_CLONED = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-IMPORTED
*/
UserDataHandler.prototype.NODE_IMPORTED = 2;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-DELETED
*/
UserDataHandler.prototype.NODE_DELETED = 3;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-RENAMED
*/
UserDataHandler.prototype.NODE_RENAMED = 4;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#UserDataHandler-ADOPTED
*/
UserDataHandler.prototype.NODE_ADOPTED = 5;
/**
* @param {number} operation
* @param {string} key
* @param {*=} opt_data
* @param {?Node=} opt_src
* @param {?Node=} opt_dst
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-handleUserDataEvent
*/
UserDataHandler.prototype.handle = function(operation, key, opt_data,
opt_src, opt_dst) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMError
*/
function DOMError() {}
/**
* @type {DOMLocator}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-location
*/
DOMError.prototype.location;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-message
*/
DOMError.prototype.message;
/**
* @type {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-relatedData
*/
DOMError.prototype.relatedData;
/**
* @type {Object}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-relatedException
*/
DOMError.prototype.relatedException;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-warning
*/
DOMError.SEVERITY_WARNING = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-error
*/
DOMError.SEVERITY_ERROR = 2;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity-fatal-error
*/
DOMError.SEVERITY_FATAL_ERROR = 3;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-severity
*/
DOMError.prototype.severity;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-DOMError-type
*/
DOMError.prototype.type;
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMErrorHandler
*/
function DOMErrorHandler() {}
/**
* @param {DOMError} error
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-ERRORS-DOMErrorHandler-handleError
*/
DOMErrorHandler.prototype.handleError = function(error) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Interfaces-DOMLocator
*/
function DOMLocator() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-byteOffset
*/
DOMLocator.prototype.byteOffset;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-column-number
*/
DOMLocator.prototype.columnNumber;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-line-number
*/
DOMLocator.prototype.lineNumber;
/**
* @type {Node}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-node
*/
DOMLocator.prototype.relatedNode;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-uri
*/
DOMLocator.prototype.uri;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMLocator-utf16Offset
*/
DOMLocator.prototype.utf16Offset;
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration
*/
function DOMConfiguration() {}
/**
* @type {DOMStringList}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-parameterNames
*/
DOMConfiguration.prototype.parameterNames;
/**
* @param {string} name
* @return {boolean}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-canSetParameter
* @nosideeffects
*/
DOMConfiguration.prototype.canSetParameter = function(name) {};
/**
* @param {string} name
* @return {*}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-getParameter
* @nosideeffects
*/
DOMConfiguration.prototype.getParameter = function(name) {};
/**
* @param {string} name
* @param {*} value
* @return {*}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration-property
*/
DOMConfiguration.prototype.setParameter = function(name, value) {};
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-internalSubset
*/
DocumentType.prototype.internalSubset;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-publicId
*/
DocumentType.prototype.publicId;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-Core-DocType-systemId
*/
DocumentType.prototype.systemId;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-inputEncoding
*/
Entity.prototype.inputEncoding;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-encoding
*/
Entity.prototype.xmlEncoding;
/**
* @type {string}
* @see http://www.w3.org/TR/DOM-Level-3-Core/core.html#Entity3-version
*/
Entity.prototype.xmlVersion;

View File

@ -0,0 +1,56 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for DOM Element Traversal interface.
* This file depends on w3c_dom1.js.
* The whole file has been fully type annotated.
* Created from:
* http://www.w3.org/TR/ElementTraversal/#ecmascript-bindings
*
* @externs
* @author arv@google.com (Erik Arvidsson)
*/
/**
* @type {Element}
* @see https://developer.mozilla.org/En/DOM/Element.firstElementChild
*/
Element.prototype.firstElementChild;
/**
* @type {Element}
* @see https://developer.mozilla.org/En/DOM/Element.lastElementChild
*/
Element.prototype.lastElementChild;
/**
* @type {Element}
* @see https://developer.mozilla.org/En/DOM/Element.previousElementSibling
*/
Element.prototype.previousElementSibling;
/**
* @type {Element}
* @see https://developer.mozilla.org/En/DOM/Element.nextElementSibling
*/
Element.prototype.nextElementSibling;
/**
* @type {number}
* @see https://developer.mozilla.org/En/DOM/Element.childElementCount
*/
Element.prototype.childElementCount;

View File

@ -0,0 +1,280 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's event specification.
* The whole file has been fully type annotated.
* Created from
* http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
*
* @externs
*/
/**
* @interface
*/
function EventTarget() {}
/**
* @param {string} type
* @param {EventListener|function(Event):(boolean|undefined)} listener
* @param {boolean} useCapture
* @return {undefined}
*/
EventTarget.prototype.addEventListener = function(type, listener, useCapture) {};
/**
* @param {string} type
* @param {EventListener|function(Event):(boolean|undefined)} listener
* @param {boolean} useCapture
* @return {undefined}
*/
EventTarget.prototype.removeEventListener = function(type, listener, useCapture) {};
/**
* @param {Event} evt
* @return {boolean}
*/
EventTarget.prototype.dispatchEvent = function(evt) {};
/**
* @interface
*/
function EventListener() {}
/**
* @param {Event} evt
* @return {undefined}
*/
EventListener.prototype.handleEvent = function(evt) {};
/**
* @constructor
*/
function Event() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
*/
Event.AT_TARGET;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
*/
Event.BUBBLING_PHASE;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Events/ecma-script-binding.html
*/
Event.CAPTURING_PHASE;
/** @type {string} */
Event.prototype.type;
/** @type {EventTarget} */
Event.prototype.target;
/** @type {EventTarget} */
Event.prototype.currentTarget;
/** @type {number} */
Event.prototype.eventPhase;
/** @type {boolean} */
Event.prototype.bubbles;
/** @type {boolean} */
Event.prototype.cancelable;
/** @type {number} */
Event.prototype.timeStamp;
/** @type {Object} */
Event.prototype.state;
/**
* @return {undefined}
*/
Event.prototype.stopPropagation = function() {};
/**
* @return {undefined}
*/
Event.prototype.preventDefault = function() {};
/**
* @param {string} eventTypeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @return {undefined}
*/
Event.prototype.initEvent = function(eventTypeArg, canBubbleArg, cancelableArg) {};
/**
* @constructor
* @extends {Event}
* @see http://www.w3.org/TR/DOM-Level-3-Events/#interface-CustomEvent
*/
function CustomEvent() {}
/**
* @param {string} eventType
* @param {boolean} bubbles
* @param {boolean} cancelable
* @param {*} detail
*/
CustomEvent.prototype.initCustomEvent = function(
eventType, bubbles, cancelable, detail) {};
/**
* @type {*}
*/
CustomEvent.prototype.detail;
/**
* @constructor
*/
function DocumentEvent() {}
/**
* @param {string} eventType
* @return {Event}
*/
DocumentEvent.prototype.createEvent = function(eventType) {};
/**
* @constructor
* @extends {Event}
*/
function UIEvent() {}
/** @type {number} */
UIEvent.prototype.detail;
///**
// * @param {string} typeArg
// * @param {boolean} canBubbleArg
// * @param {boolean} cancelableArg
// * @param {AbstractView} viewArg
// * @param {number} detailArg
// * @return undefined
// */
//UIEvent.prototype.initUIEvent = function (typeArg, canBubbleArg, cancelableArg, viewArg, detailArg) {};
/**
* @constructor
* @extends {UIEvent}
*/
function MouseEvent() {}
/** @type {number} */
MouseEvent.prototype.screenX;
/** @type {number} */
MouseEvent.prototype.screenY;
/** @type {number} */
MouseEvent.prototype.clientX;
/** @type {number} */
MouseEvent.prototype.clientY;
/** @type {boolean} */
MouseEvent.prototype.ctrlKey;
/** @type {boolean} */
MouseEvent.prototype.shiftKey;
/** @type {boolean} */
MouseEvent.prototype.altKey;
/** @type {boolean} */
MouseEvent.prototype.metaKey;
/** @type {number} */
MouseEvent.prototype.button;
/** @type {EventTarget} */
MouseEvent.prototype.relatedTarget;
/**
* @constructor
* @extends {Event}
*/
function MutationEvent() {}
/** @type {Node} */
MutationEvent.prototype.relatedNode;
/** @type {string} */
MutationEvent.prototype.prevValue;
/** @type {string} */
MutationEvent.prototype.newValue;
/** @type {string} */
MutationEvent.prototype.attrName;
/** @type {number} */
MutationEvent.prototype.attrChange;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Node} relatedNodeArg
* @param {string} prevValueArg
* @param {string} newValueArg
* @param {string} attrNameArg
* @param {number} attrChangeArg
* @return {undefined}
*/
MutationEvent.prototype.initMutationEvent = function(typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg) {};
// DOM3
/**
* @constructor
* @extends {UIEvent}
*/
function KeyboardEvent() {}
/** @type {string} */
KeyboardEvent.prototype.keyIdentifier;
/** @type {boolean} */
KeyboardEvent.prototype.ctrlKey;
/** @type {boolean} */
KeyboardEvent.prototype.shiftKey;
/** @type {boolean} */
KeyboardEvent.prototype.altKey;
/** @type {boolean} */
KeyboardEvent.prototype.metaKey;
/**
* @param {string} keyIdentifierArg
* @return {boolean}
*/
KeyboardEvent.prototype.getModifierState = function(keyIdentifierArg) {};

View File

@ -0,0 +1,60 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's event Level 3 specification.
* This file depends on w3c_event.js.
* The whole file has been partially type annotated.
* Created from
* http://www.w3.org/TR/DOM-Level-3-Events/#ecma-script-binding-ecma-binding
*
* @externs
*/
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {string} keyIdentifierArg
* @param {number} keyLocationArg
* @param {string} modifiersList
*/
KeyboardEvent.prototype.initKeyboardEvent = function(typeArg, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, modifiersList) {};
/** @type {string} */
KeyboardEvent.prototype['char'];
/** @type {string} */
KeyboardEvent.prototype.key;
/** @type {number} */
KeyboardEvent.prototype.location;
/** @type {boolean} */
KeyboardEvent.prototype.repeat;
/** @type {string} */
KeyboardEvent.prototype.locale;
/** @type {boolean} */
Event.prototype.defaultPrevented;
/** @type {string} */
Event.prototype.namespaceURI;
/** @return {undefined} */
Event.prototype.stopImmediatePropagation = function() {};

View File

@ -0,0 +1,101 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Geolocation specification
* http://www.w3.org/TR/geolocation-API/
* @externs
*/
/**
* @constructor
* @see http://www.w3.org/TR/geolocation-API/#geolocation
*/
function Geolocation() {}
/**
* @param {function(GeolocationPosition)} successCallback
* @param {(function(GeolocationPositionError)|null)=} opt_errorCallback
* @param {GeolocationPositionOptions=} opt_options
*/
Geolocation.prototype.getCurrentPosition = function(successCallback,
opt_errorCallback,
opt_options) {};
/**
* @param {function(GeolocationPosition)} successCallback
* @param {(function(GeolocationPositionError)|null)=} opt_errorCallback
* @param {GeolocationPositionOptions=} opt_options
* @return {number}
*/
Geolocation.prototype.watchPosition = function(successCallback,
opt_errorCallback,
opt_options) {};
/** @param {number} watchId */
Geolocation.prototype.clearWatch = function(watchId) {};
/**
* @constructor
* @see http://www.w3.org/TR/geolocation-API/#coordinates
*/
function GeolocationCoordinates() {}
/** @type {number} */ GeolocationCoordinates.prototype.latitude;
/** @type {number} */ GeolocationCoordinates.prototype.longitude;
/** @type {number} */ GeolocationCoordinates.prototype.accuracy;
/** @type {number} */ GeolocationCoordinates.prototype.altitude;
/** @type {number} */ GeolocationCoordinates.prototype.altitudeAccuracy;
/** @type {number} */ GeolocationCoordinates.prototype.heading;
/** @type {number} */ GeolocationCoordinates.prototype.speed;
/**
* @constructor
* @see http://www.w3.org/TR/geolocation-API/#position
*/
function GeolocationPosition() {}
/** @type {GeolocationCoordinates} */
GeolocationPosition.prototype.coords;
/** @type {Date} */ GeolocationPosition.prototype.timestamp;
/**
* @constructor
* @see http://www.w3.org/TR/geolocation-API/#position-options
*/
function GeolocationPositionOptions() {}
/** @type {boolean} */
GeolocationPositionOptions.prototype.enableHighAccuracy;
/** @type {number} */ GeolocationPositionOptions.prototype.maximumAge;
/** @type {number} */ GeolocationPositionOptions.prototype.timeout;
/**
* @constructor
* @see http://www.w3.org/TR/geolocation-API/#position-error
*/
function GeolocationPositionError() {}
/** @type {number} */ GeolocationPositionError.prototype.code;
/** @type {string} */ GeolocationPositionError.prototype.message;
/** @type {number} */ GeolocationPositionError.prototype.UNKNOWN_ERROR;
/** @type {number} */ GeolocationPositionError.prototype.PERMISSION_DENIED;
/** @type {number} */
GeolocationPositionError.prototype.POSITION_UNAVAILABLE;
/** @type {number} */ GeolocationPositionError.prototype.TIMEOUT;
/** @type {Geolocation} */
Navigator.prototype.geolocation;

View File

@ -0,0 +1,929 @@
/*
* Copyright 2011 PicNet Pty Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's IndexedDB API. In Chrome all the
* IndexedDB classes are prefixed with 'webkit'. In order to access constants
* and static methods of these classes they must be duplicated with the
* prefix here.
* @see http://www.w3.org/TR/IndexedDB/
*
* @externs
* @author guido.tapia@picnet.com.au (Guido Tapia)
*/
/** @type {IDBFactory} */
Window.prototype.moz_indexedDB;
/** @type {IDBFactory} */
Window.prototype.mozIndexedDB;
/** @type {IDBFactory} */
Window.prototype.webkitIndexedDB;
/** @type {IDBFactory} */
Window.prototype.msIndexedDB;
/** @type {IDBFactory} */
Window.prototype.indexedDB;
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBFactory
*/
function IDBFactory() {}
/**
* @param {string} name The name of the database to open.
* @param {number=} opt_version The version at which to open the database.
* @return {!IDBOpenDBRequest} The IDBRequest object.
*/
IDBFactory.prototype.open = function(name, opt_version) {};
/**
* @param {string} name The name of the database to delete.
* @return {!IDBOpenDBRequest} The IDBRequest object.
*/
IDBFactory.prototype.deleteDatabase = function(name) {};
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabaseException
*/
function IDBDatabaseException() {}
/**
* @constructor
* @extends {IDBDatabaseException}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabaseException
*/
function webkitIDBDatabaseException() {}
/**
* @const
* @type {number}
*/
IDBDatabaseException.UNKNOWN_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.UNKNOWN_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.NON_TRANSIENT_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.NON_TRANSIENT_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.NOT_FOUND_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.NOT_FOUND_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.CONSTRAINT_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.CONSTRAINT_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.DATA_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.DATA_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.NOT_ALLOWED_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.NOT_ALLOWED_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.TRANSACTION_INACTIVE_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.TRANSACTION_INACTIVE_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.ABORT_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.ABORT_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.READ_ONLY_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.READ_ONLY_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.TIMEOUT_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.TIMEOUT_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.QUOTA_ERR;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.QUOTA_ERR;
/**
* @const
* @type {number}
*/
IDBDatabaseException.code;
/**
* @const
* @type {number}
*/
webkitIDBDatabaseException.code;
/**
* @const
* @type {string}
*/
IDBDatabaseException.message;
/**
* @const
* @type {string}
*/
webkitIDBDatabaseException.message;
/** @type {function(new:IDBRequest)} */
Window.prototype.IDBRequest;
/** @type {function(new:IDBRequest)} */
Window.prototype.webkitIDBRequest;
/**
* @constructor
* @implements {EventTarget}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest
*/
function IDBRequest() {}
/** @override */
IDBRequest.prototype.addEventListener = function(type, listener, useCapture) {};
/** @override */
IDBRequest.prototype.removeEventListener =
function(type, listener, useCapture) {};
/** @override */
IDBRequest.prototype.dispatchEvent = function(evt) {};
/**
* @constructor
* @extends {IDBRequest}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest
*/
function webkitIDBRequest() {}
/**
* @type {number}
* @const
*/
IDBRequest.LOADING;
/**
* @type {number}
* @const
*/
webkitIDBRequest.LOADING;
/**
* @type {number}
* @const
*/
IDBRequest.DONE;
/**
* @type {number}
* @const
*/
webkitIDBRequest.DONE;
/**
* @type {number}
* @const
*/
IDBRequest.prototype.readyState;
/**
* @type {function(!Event)}
*/
IDBRequest.prototype.onsuccess = function(e) {};
/**
* @type {function(!Event)}
*/
IDBRequest.prototype.onerror = function(e) {};
/**
* @type {*}
* @const
*/
IDBRequest.prototype.result;
/**
* @type {number}
* @const
*/
IDBRequest.prototype.errorCode;
/**
* @type {Object}
* @const
*/
IDBRequest.prototype.source;
/**
* @type {IDBTransaction}
* @const
*/
IDBRequest.prototype.transaction;
/** @type {function(new:IDBOpenDBRequest)} */
Window.prototype.IDBOpenDBRequest;
/**
* @constructor
* @extends {IDBRequest}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBOpenDBRequest
*/
function IDBOpenDBRequest() {}
/**
* @type {function(!IDBVersionChangeEvent)}
*/
IDBOpenDBRequest.prototype.onblocked = function(e) {};
/**
* @type {function(!IDBVersionChangeEvent)}
*/
IDBOpenDBRequest.prototype.onupgradeneeded = function(e) {};
/**
* @constructor
* @implements {EventTarget}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabase
*/
function IDBDatabase() {}
/**
* @type {string}
* @const
*/
IDBDatabase.prototype.name;
/**
* @type {string}
* @const
*/
IDBDatabase.prototype.description;
/**
* @type {string}
* @const
*/
IDBDatabase.prototype.version;
/**
* @type {DOMStringList}
* @const
*/
IDBDatabase.prototype.objectStoreNames;
/**
* @param {string} name The name of the object store.
* @param {Object=} opt_parameters Parameters to be passed
* creating the object store.
* @return {!IDBObjectStore} The created/open object store.
*/
IDBDatabase.prototype.createObjectStore =
function(name, opt_parameters) {};
/**
* @param {string} name The name of the object store to remove.
*/
IDBDatabase.prototype.deleteObjectStore = function(name) {};
/**
* @param {string} version The new version of the database.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBDatabase.prototype.setVersion = function(version) {};
/**
* @param {Array.<string>} storeNames The stores to open in this transaction.
* @param {(number|string)=} mode The mode for opening the object stores.
* @return {!IDBTransaction} The IDBRequest object.
*/
IDBDatabase.prototype.transaction = function(storeNames, mode) {};
/**
* Closes the database connection.
*/
IDBDatabase.prototype.close = function() {};
/**
* @type {Function}
*/
IDBDatabase.prototype.onabort = function() {};
/**
* @type {Function}
*/
IDBDatabase.prototype.onerror = function() {};
/**
* @type {Function}
*/
IDBDatabase.prototype.onversionchange = function() {};
/** @override */
IDBDatabase.prototype.addEventListener =
function(type, listener, useCapture) {};
/** @override */
IDBDatabase.prototype.removeEventListener =
function(type, listener, useCapture) {};
/** @override */
IDBDatabase.prototype.dispatchEvent = function(evt) {};
/**
* Typedef for valid key types according to the w3 specification. Note that this
* is slightly wider than what is actually allowed, as all Array elements must
* have a valid key type.
* @see http://www.w3.org/TR/IndexedDB/#key-construct
* @typedef {number|string|!Date|!Array}
*/
var IDBKeyType;
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStore
*/
function IDBObjectStore() {}
/**
* @type {string}
*/
IDBObjectStore.prototype.name;
/**
* @type {string}
*/
IDBObjectStore.prototype.keyPath;
/**
* @type {DOMStringList}
*/
IDBObjectStore.prototype.indexNames;
/** @type {IDBTransaction} */
IDBObjectStore.prototype.transaction;
/** @type {boolean} */
IDBObjectStore.prototype.autoIncrement;
/**
* @param {*} value The value to put into the object store.
* @param {IDBKeyType=} key The key of this value.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.put = function(value, key) {};
/**
* @param {*} value The value to add into the object store.
* @param {IDBKeyType=} key The key of this value.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.add = function(value, key) {};
/**
* @param {IDBKeyType} key The key of this value.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype['delete'] = function(key) {};
/**
* @param {IDBKeyType} key The key of the document to retrieve.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.get = function(key) {};
/**
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.clear = function() {};
/**
* @param {IDBKeyRange=} range The range of the cursor.
* @param {(number|string)=} direction The direction of cursor enumeration.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.openCursor = function(range, direction) {};
/**
* @param {string} name The name of the index.
* @param {string} keyPath The path to the index key.
* @param {Object=} opt_paramters Optional parameters
* for the created index.
* @return {!IDBIndex} The IDBIndex object.
*/
IDBObjectStore.prototype.createIndex = function(name, keyPath, opt_paramters) {};
/**
* @param {string} name The name of the index to retrieve.
* @return {!IDBIndex} The IDBIndex object.
*/
IDBObjectStore.prototype.index = function(name) {};
/**
* @param {string} indexName The name of the index to remove.
*/
IDBObjectStore.prototype.deleteIndex = function(indexName) {};
/**
* @param {IDBKeyType=} key The key of this value.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBObjectStore.prototype.count = function(key) {};
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBIndex
*/
function IDBIndex() {}
/**
* @type {string}
* @const
*/
IDBIndex.prototype.name;
/**
* @type {!IDBObjectStore}
* @const
*/
IDBIndex.prototype.objectStore;
/**
* @type {string}
* @const
*/
IDBIndex.prototype.keyPath;
/**
* @type {boolean}
* @const
*/
IDBIndex.prototype.unique;
/**
* @param {IDBKeyRange=} range The range of the cursor.
* @param {(number|string)=} direction The direction of cursor enumeration.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBIndex.prototype.openCursor = function(range, direction) {};
/**
* @param {IDBKeyRange=} range The range of the cursor.
* @param {(number|string)=} direction The direction of cursor enumeration.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBIndex.prototype.openKeyCursor = function(range, direction) {};
/**
* @param {*} key The id of the object to retrieve.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBIndex.prototype.get = function(key) {};
/**
* @param {*} key The id of the object to retrieve.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBIndex.prototype.getKey = function(key) {};
/** @type {function(new:IDBCursor)} */
Window.prototype.IDBCursor;
/** @type {function(new:IDBCursor)} */
Window.prototype.webkitIDBCursor;
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor
*/
function IDBCursor() {}
/**
* @constructor
* @extends {IDBCursor}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor
*/
function webkitIDBCursor() {}
/**
* @const
* @type {number}
*/
IDBCursor.NEXT;
/**
* @const
* @type {number}
*/
webkitIDBCursor.NEXT;
/**
* @const
* @type {number}
*/
IDBCursor.NEXT_NO_DUPLICATE;
/**
* @const
* @type {number}
*/
webkitIDBCursor.NEXT_NO_DUPLICATE;
/**
* @const
* @type {number}
*/
IDBCursor.PREV;
/**
* @const
* @type {number}
*/
webkitIDBCursor.PREV;
/**
* @const
* @type {number}
*/
IDBCursor.PREV_NO_DUPLICATE;
/**
* @const
* @type {number}
*/
webkitIDBCursor.PREV_NO_DUPLICATE;
/**
* @type {*}
* @const
*/
IDBCursor.prototype.source;
/**
* @type {number}
* @const
*/
IDBCursor.prototype.direction;
/**
* @type {IDBKeyType}
* @const
*/
IDBCursor.prototype.key;
/**
* @type {number}
* @const
*/
IDBCursor.prototype.primaryKey;
/**
* @param {*} value The new value for the current object in the cursor.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBCursor.prototype.update = function(value) {};
/**
* Note: Must be quoted to avoid parse error.
* @param {*=} key Continue enumerating the cursor from the specified key
* (or next).
*/
IDBCursor.prototype['continue'] = function(key) {};
/**
* @param {number} count Number of times to iterate the cursor.
*/
IDBCursor.prototype.advance = function(count) {};
/**
* Note: Must be quoted to avoid parse error.
* @return {!IDBRequest} The IDBRequest object.
*/
IDBCursor.prototype['delete'] = function() {};
/** @type {function(new:IDBTransaction)} */
Window.prototype.IDBTransaction;
/** @type {function(new:IDBTransaction)} */
Window.prototype.webkitIDBTransaction;
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction
*/
function IDBTransaction() {}
/**
* @constructor
* @extends {IDBTransaction}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBTransaction
*/
function webkitIDBTransaction() {}
/**
* @const
* @type {number}
*/
IDBTransaction.READ_WRITE;
/**
* @const
* @type {number}
*/
webkitIDBTransaction.READ_WRITE;
/**
* @const
* @type {number}
*/
IDBTransaction.READ_ONLY;
/**
* @const
* @type {number}
*/
webkitIDBTransaction.READ_ONLY;
/**
* @const
* @type {number}
*/
IDBTransaction.VERSION_CHANGE;
/**
* @const
* @type {number}
*/
webkitIDBTransaction.VERSION_CHANGE;
/**
* @type {number|string}
* @const
*/
IDBTransaction.prototype.mode;
/**
* @type {IDBDatabase}
* @const
*/
IDBTransaction.prototype.db;
/**
* @param {string} name The name of the object store to retrieve.
* @return {!IDBObjectStore} The object store.
*/
IDBTransaction.prototype.objectStore = function(name) {};
/**
* Aborts the transaction.
*/
IDBTransaction.prototype.abort = function() {};
/**
* @type {Function}
*/
IDBTransaction.prototype.onabort = function() {};
/**
* @type {Function}
*/
IDBTransaction.prototype.oncomplete = function() {};
/**
* @type {Function}
*/
IDBTransaction.prototype.onerror = function() {};
/** @type {function(new:IDBKeyRange)} */
Window.prototype.IDBKeyRange;
/** @type {function(new:IDBKeyRange)} */
Window.prototype.webkitIDBKeyRange;
/**
* @constructor
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange
*/
function IDBKeyRange() {}
/**
* @constructor
* @extends {IDBKeyRange}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBKeyRange
*/
function webkitIDBKeyRange() {}
/**
* @type {*}
* @const
*/
IDBKeyRange.prototype.lower;
/**
* @type {*}
* @const
*/
IDBKeyRange.prototype.upper;
/**
* @type {*}
* @const
*/
IDBKeyRange.prototype.lowerOpen;
/**
* @type {*}
* @const
*/
IDBKeyRange.prototype.upperOpen;
/**
* @param {*} value The single key value of this range.
* @return {!IDBKeyRange} The key range.
*/
IDBKeyRange.only = function(value) {};
/**
* @param {*} value The single key value of this range.
* @return {!IDBKeyRange} The key range.
*/
webkitIDBKeyRange.only = function(value) {};
/**
* @param {*} bound Creates a lower bound key range.
* @param {boolean=} open Open the key range.
* @return {!IDBKeyRange} The key range.
*/
IDBKeyRange.lowerBound = function(bound, open) {};
/**
* @param {*} bound Creates a lower bound key range.
* @param {boolean=} open Open the key range.
* @return {!IDBKeyRange} The key range.
*/
webkitIDBKeyRange.lowerBound = function(bound, open) {};
/**
* @param {*} bound Creates an upper bound key range.
* @param {boolean=} open Open the key range.
* @return {!IDBKeyRange} The key range.
*/
IDBKeyRange.upperBound = function(bound, open) {};
/**
* @param {*} bound Creates an upper bound key range.
* @param {boolean=} open Open the key range.
* @return {!IDBKeyRange} The key range.
*/
webkitIDBKeyRange.upperBound = function(bound, open) {};
/**
* @param {*} left The left bound value of openLeft is true.
* @param {*} right The right bound value of openRight is true.
* @param {boolean=} openLeft Whether to open a left bound range.
* @param {boolean=} openRight Whether to open a right bound range.
* @return {!IDBKeyRange} The key range.
*/
IDBKeyRange.bound = function(left, right, openLeft, openRight) {};
/**
* @param {*} left The left bound value of openLeft is true.
* @param {*} right The right bound value of openRight is true.
* @param {boolean=} openLeft Whether to open a left bound range.
* @param {boolean=} openRight Whether to open a right bound range.
* @return {!IDBKeyRange} The key range.
*/
webkitIDBKeyRange.bound = function(left, right, openLeft, openRight) {};
/**
* @constructor
* @extends {Event}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent
*/
function IDBVersionChangeEvent() {}
/**
* @type {number}
* @const
*/
IDBVersionChangeEvent.prototype.oldVersion;
/**
* @type {?number}
* @const
*/
IDBVersionChangeEvent.prototype.newVersion;
/**
* @constructor
* @extends {IDBVersionChangeEvent}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBVersionChangeEvent
*/
function webkitIDBVersionChangeEvent() {}
/**
* @type {string}
* @const
*/
webkitIDBVersionChangeEvent.prototype.version;

View File

@ -0,0 +1,155 @@
/*
* Copyright 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Navigation Timing specification.
*
* Created from
* @see http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
* @see http://w3c-test.org/webperf/specs/ResourceTiming
* @see http://www.w3.org/TR/performance-timeline
*
* @externs
*/
/** @constructor */
function PerformanceTiming() {}
/** @type {number} */ PerformanceTiming.prototype.navigationStart;
/** @type {number} */ PerformanceTiming.prototype.unloadEventStart;
/** @type {number} */ PerformanceTiming.prototype.unloadEventEnd;
/** @type {number} */ PerformanceTiming.prototype.redirectStart;
/** @type {number} */ PerformanceTiming.prototype.redirectEnd;
/** @type {number} */ PerformanceTiming.prototype.fetchStart;
/** @type {number} */ PerformanceTiming.prototype.domainLookupStart;
/** @type {number} */ PerformanceTiming.prototype.domainLookupEnd;
/** @type {number} */ PerformanceTiming.prototype.connectStart;
/** @type {number} */ PerformanceTiming.prototype.connectEnd;
/** @type {number} */ PerformanceTiming.prototype.secureConnectionStart;
/** @type {number} */ PerformanceTiming.prototype.requestStart;
/** @type {number} */ PerformanceTiming.prototype.responseStart;
/** @type {number} */ PerformanceTiming.prototype.responseEnd;
/** @type {number} */ PerformanceTiming.prototype.domLoading;
/** @type {number} */ PerformanceTiming.prototype.domInteractive;
/** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventStart;
/** @type {number} */ PerformanceTiming.prototype.domContentLoadedEventEnd;
/** @type {number} */ PerformanceTiming.prototype.domComplete;
/** @type {number} */ PerformanceTiming.prototype.loadEventStart;
/** @type {number} */ PerformanceTiming.prototype.loadEventEnd;
/** @constructor */
function PerformanceEntry() {}
/** @type {string} */ PerformanceEntry.prototype.name;
/** @type {string} */ PerformanceEntry.prototype.entryType;
/** @type {number} */ PerformanceEntry.prototype.startTime;
/** @type {number} */ PerformanceEntry.prototype.duration;
/**
* @constructor
* @extends {PerformanceEntry}
*/
function PerformanceResourceTiming() {}
/** @type {number} */ PerformanceResourceTiming.prototype.redirectStart;
/** @type {number} */ PerformanceResourceTiming.prototype.redirectEnd;
/** @type {number} */ PerformanceResourceTiming.prototype.fetchStart;
/** @type {number} */ PerformanceResourceTiming.prototype.domainLookupStart;
/** @type {number} */ PerformanceResourceTiming.prototype.domainLookupEnd;
/** @type {number} */ PerformanceResourceTiming.prototype.connectStart;
/** @type {number} */ PerformanceResourceTiming.prototype.connectEnd;
/** @type {number} */
PerformanceResourceTiming.prototype.secureConnectionStart;
/** @type {number} */ PerformanceResourceTiming.prototype.requestStart;
/** @type {number} */ PerformanceResourceTiming.prototype.responseStart;
/** @type {number} */ PerformanceResourceTiming.prototype.responseEnd;
/** @type {string} */ PerformanceResourceTiming.prototype.initiatorType;
/** @constructor */
function PerformanceNavigation() {}
/** @type {number} */ PerformanceNavigation.prototype.TYPE_NAVIGATE = 0;
/** @type {number} */ PerformanceNavigation.prototype.TYPE_RELOAD = 1;
/** @type {number} */ PerformanceNavigation.prototype.TYPE_BACK_FORWARD = 2;
/** @type {number} */ PerformanceNavigation.prototype.TYPE_RESERVED = 255;
/** @type {number} */ PerformanceNavigation.prototype.type;
/** @type {number} */ PerformanceNavigation.prototype.redirectCount;
// Only available in WebKit, and only with the --enable-memory-info flag.
/** @constructor */
function PerformanceMemory() {}
/** @type {number} */ PerformanceMemory.prototype.jsHeapSizeLimit;
/** @type {number} */ PerformanceMemory.prototype.totalJSHeapSize;
/** @type {number} */ PerformanceMemory.prototype.usedJSHeapSize;
/** @constructor */
function Performance() {}
/** @type {PerformanceTiming} */ Performance.prototype.timing;
/** @type {PerformanceNavigation} */ Performance.prototype.navigation;
/**
* Clears the buffer used to store the current list of
* PerformanceResourceTiming resources.
* @return {undefined}
*/
Performance.prototype.clearResourceTimings = function() {};
/**
* Set the maximum number of PerformanceResourceTiming resources that may be
* stored in the buffer.
* @param {number} maxSize
*/
Performance.prototype.setResourceTimingBufferSize = function(maxSize) {};
/**
* @return {Array.<PerformanceEntry>} A copy of the PerformanceEntry list,
* in chronological order with respect to startTime.
* @nosideeffects
*/
Performance.prototype.getEntries = function() {};
/**
* @param {string} entryType Only return {@code PerformanceEntry}s with this
* entryType.
* @return {Array.<PerformanceEntry>} A copy of the PerformanceEntry list,
* in chronological order with respect to startTime.
* @nosideeffects
*/
Performance.prototype.getEntriesByType = function(entryType) {};
/**
* @param {string} name Only return {@code PerformanceEntry}s with this name.
* @param {string=} opt_entryType Only return {@code PerformanceEntry}s with
* this entryType.
* @return {Array.<PerformanceEntry>} PerformanceEntry list in chronological
* order with respect to startTime.
* @nosideeffects
*/
Performance.prototype.getEntriesByName = function(name, opt_entryType) {};
// Only available in WebKit, and only with the --enable-memory-info flag.
/** @type {PerformanceMemory} */ Performance.prototype.memory;
/**
* @return {number}
* @nosideeffects
*/
Performance.prototype.now = function() {};
/**
* @return {number}
* @nosideeffects
*/
Performance.prototype.webkitNow = function() {};
/** @type {Performance} */
Window.prototype.performance;

View File

@ -0,0 +1,247 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's range specification.
* This file depends on w3c_dom2.js.
* The whole file has been fully type annotated.
* Created from
* http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html
*
* @externs
*/
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Interface
*/
function Range() {}
/**
* @type {Node}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-startParent
*/
Range.prototype.startContainer;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-startOffset
*/
Range.prototype.startOffset;
/**
* @type {Node}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-endParent
*/
Range.prototype.endContainer;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-endOffset
*/
Range.prototype.endOffset;
/**
* @type {boolean}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-collapsed
*/
Range.prototype.collapsed;
/**
* @type {Node}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-attr-commonParent
*/
Range.prototype.commonAncestorContainer;
/**
* @param {Node} refNode
* @param {number} offset
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setStart
*/
Range.prototype.setStart = function(refNode, offset) {};
/**
* @param {Node} refNode
* @param {number} offset
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEnd
*/
Range.prototype.setEnd = function(refNode, offset) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-setStartBefore
*/
Range.prototype.setStartBefore = function(refNode) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setStartAfter
*/
Range.prototype.setStartAfter = function(refNode) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEndBefore
*/
Range.prototype.setEndBefore = function(refNode) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-setEndAfter
*/
Range.prototype.setEndAfter = function(refNode) {};
/**
* @param {boolean} toStart
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-collapse
*/
Range.prototype.collapse = function(toStart) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-selectNode
*/
Range.prototype.selectNode = function(refNode) {};
/**
* @param {Node} refNode
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-selectNodeContents
*/
Range.prototype.selectNodeContents = function(refNode) {};
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
*/
Range.prototype.START_TO_START = 0;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
*/
Range.prototype.START_TO_END = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
*/
Range.prototype.END_TO_END = 2;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-compareHow
*/
Range.prototype.END_TO_START = 3;
/**
* @param {number} how
* @param {Range} sourceRange
* @return {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-compareBoundaryPoints
*/
Range.prototype.compareBoundaryPoints = function(how, sourceRange) {};
/**
* @return {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-deleteContents
*/
Range.prototype.deleteContents = function() {};
/**
* @return {DocumentFragment}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-extractContents
*/
Range.prototype.extractContents = function() {};
/**
* @return {DocumentFragment}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-cloneContents
*/
Range.prototype.cloneContents = function() {};
/**
* @param {Node} newNode
* @return {DocumentFragment}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-insertNode
*/
Range.prototype.insertNode = function(newNode) {};
/**
* @param {Node} newParent
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-surroundContents
*/
Range.prototype.surroundContents = function(newParent) {};
/**
* @return {Range}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-clone
*/
Range.prototype.cloneRange = function() {};
/**
* @return {undefined}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-Range-method-detach
*/
Range.prototype.detach = function() {};
// Introduced in DOM Level 2:
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-DocumentRange-idl
*/
function DocumentRange() {}
/**
* @return {Range}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level2-DocumentRange-method-createRange
*/
DocumentRange.prototype.createRange = function() {};
// Introduced in DOM Level 2:
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeException
*/
function RangeException() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
*/
RangeException.prototype.code;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
*/
RangeException.prototype.BAD_BOUNDARYPOINTS_ERR = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#RangeExceptionCode
*/
RangeException.prototype.INVALID_NODE_TYPE_ERR = 2;

View File

@ -0,0 +1,79 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Selectors API.
* This file depends on w3c_dom1.js.
* @see http://www.w3.org/TR/selectors-api2/
*
* @externs
*/
/**
* @param {string} selectors
* @return {Element}
* @override
*/
Document.prototype.querySelector = function(selectors) {};
/**
* @param {string} selectors
* @return {!NodeList}
* @override
*/
Document.prototype.querySelectorAll = function(selectors) {};
/**
* @param {string} selectors
* @return {Element}
* @override
*/
Element.prototype.querySelector = function(selectors) {};
/**
* @param {string} selectors
* @return {!NodeList}
* @override
*/
Element.prototype.querySelectorAll = function(selectors) {};
/**
* @param {string} selectors
* @param {(Node|NodeList)=} refNodes
* @return {boolean}
*/
Element.prototype.matchesSelector = function(selectors, refNodes) {};
/**
* @see https://developer.mozilla.org/en/DOM/Node.mozMatchesSelector
* @param {string} selectors
* @return {boolean}
*/
Element.prototype.mozMatchesSelector = function(selectors) {};
/**
* @see http://developer.apple.com/library/safari/documentation/WebKit/Reference/ElementClassRef/Element/Element.html
* @param {string} selectors
* @return {boolean}
*/
Element.prototype.webkitMatchesSelector = function(selectors) {};
/**
* @see http://msdn.microsoft.com/en-us/library/ff975201.aspx
* @param {string} selectors
* @return {boolean}
*/
Element.prototype.msMatchesSelector = function(selectors) {};

View File

@ -0,0 +1,405 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's XML related specifications.
* This file depends on w3c_dom2.js.
* The whole file has been fully type annotated.
*
* Provides the XML standards from W3C.
* Includes:
* XPath - Fully type annotated
* XMLHttpRequest - Fully type annotated
*
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html
* @see http://www.w3.org/TR/XMLHttpRequest/
* @see http://www.w3.org/TR/XMLHttpRequest2/
*
* @externs
*/
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathException
*/
function XPathException() {}
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#INVALID_EXPRESSION_ERR
*/
XPathException.INVALID_EXPRESSION_ERR = 52;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#TYPE_ERR
*/
XPathException.TYPE_ERR = 52;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#
*/
XPathException.prototype.code;
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator
*/
function XPathEvaluator() {}
/**
* @param {string} expr
* @param {?XPathNSResolver=} opt_resolver
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-createExpression
* @throws XPathException
* @throws DOMException
*/
XPathEvaluator.prototype.createExpression = function(expr, opt_resolver) {};
/**
* @param {Node} nodeResolver
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-createNSResolver
*/
XPathEvaluator.prototype.createNSResolver = function(nodeResolver) {};
/**
* @param {string} expr
* @param {Node} contextNode
* @param {?XPathNSResolver=} opt_resolver
* @param {?number=} opt_type
* @param {*=} opt_result
* @return {XPathResult}
* @throws XPathException
* @throws DOMException
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate
*/
XPathEvaluator.prototype.evaluate = function(expr, contextNode, opt_resolver,
opt_type, opt_result) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
*/
function XPathExpression() {}
/**
* @param {Node} contextNode
* @param {number=} opt_type
* @param {*=} opt_result
* @return {*}
* @throws XPathException
* @throws DOMException
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression-evaluate
*/
XPathExpression.prototype.evaluate = function(contextNode, opt_type,
opt_result) {};
/**
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNSResolver
*/
function XPathNSResolver() {}
/**
* @param {string} prefix
* @return {?string}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNSResolver-lookupNamespaceURI
*/
XPathNSResolver.prototype.lookupNamespaceURI = function(prefix) {};
/**
* From http://www.w3.org/TR/xpath
*
* XPath is a language for addressing parts of an XML document, designed to be
* used by both XSLT and XPointer.
*
* @noalias
* @constructor
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult
*/
function XPathResult() {}
/**
* @type {boolean} {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-booleanValue
*/
XPathResult.prototype.booleanValue;
/**
* @type {boolean} {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-invalid-iterator-state
*/
XPathResult.prototype.invalidInteratorState;
/**
* @type {number}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-numberValue
*/
XPathResult.prototype.numberValue;
/**
* @type {number}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-resultType
*/
XPathResult.prototype.resultType;
/**
* @type {Node}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-singleNodeValue
*/
XPathResult.prototype.singleNodeValue;
/**
* @type {number}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-snapshot-length
*/
XPathResult.prototype.snapshotLength;
/**
* @type {string}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-stringValue
*/
XPathResult.prototype.stringValue;
/**
* @return {Node}
* @throws XPathException {@see XPathException.TYPE_ERR}
* @throws DOMException {@see DOMException.INVALID_STATE_ERR}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-iterateNext
*/
XPathResult.prototype.iterateNext = function() {};
/**
* @param {number} index
* @return {Node}
* @throws XPathException
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-snapshotItem
*/
XPathResult.prototype.snapshotItem = function(index) {};
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ANY-TYPE
*/
XPathResult.ANY_TYPE = 0;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-NUMBER-TYPE
*/
XPathResult.NUMBER_TYPE = 1;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-STRING-TYPE
*/
XPathResult.STRING_TYPE = 2;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-BOOLEAN-TYPE
*/
XPathResult.BOOLEAN_TYPE = 3;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-UNORDERED-NODE-ITERATOR-TYPE
*/
XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-ITERATOR-TYPE
*/
XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-UNORDERED-NODE-SNAPSHOT-TYPE
*/
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ORDERED-NODE-SNAPSHOT-TYPE
*/
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-ANY-UNORDERED-NODE-TYPE
*/
XPathResult.ANY_UNORDERED_NODE_TYPE = 8;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResult-FIRST-ORDERED-NODE-TYPE
*/
XPathResult.FIRST_ORDERED_NODE_TYPE = 9;
/**
* @constructor
* @extends {Node}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNamespace
*/
function XPathNamespace() {}
/**
* @type {Element}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathNamespace-ownerElement
*/
XPathNamespace.prototype.ownerElement;
/**
* @type {number}
* @see http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPATH_NAMESPACE_NODE
*/
XPathNamespace.XPATH_NAMESPACE_NODE = 13;
/**
* From http://www.w3.org/TR/XMLHttpRequest/
*
* (Draft)
*
* The XMLHttpRequest Object specification defines an API that provides
* scripted client functionality for transferring data between a client and a
* server.
*
* @constructor
* @implements {EventTarget}
* @see http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest-object
*/
function XMLHttpRequest() {}
/** @override */
XMLHttpRequest.prototype.addEventListener =
function(type, listener, useCapture) {};
/** @override */
XMLHttpRequest.prototype.removeEventListener =
function(type, listener, useCapture) {};
/** @override */
XMLHttpRequest.prototype.dispatchEvent = function(evt) {};
/**
* @param {string} method
* @param {string} url
* @param {?boolean=} opt_async
* @param {?string=} opt_user
* @param {?string=} opt_password
* @return {undefined}
* @see http://www.w3.org/TR/XMLHttpRequest/#open
*/
XMLHttpRequest.prototype.open = function(method, url, opt_async, opt_user,
opt_password) {};
/**
* @param {string} header
* @param {string} value
* @return {undefined}
* @see http://www.w3.org/TR/XMLHttpRequest/#setrequestheader
*/
XMLHttpRequest.prototype.setRequestHeader = function(header, value) {};
/**
* @param {ArrayBuffer|Blob|Document|FormData|string=} opt_data
* @return {undefined}
* @see http://www.w3.org/TR/XMLHttpRequest/#send
* @see http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-send-method
*/
XMLHttpRequest.prototype.send = function(opt_data) {};
/**
* @return {undefined}
* @see http://www.w3.org/TR/XMLHttpRequest/#abort
*/
XMLHttpRequest.prototype.abort = function() {};
/**
* @return {string}
* @see http://www.w3.org/TR/XMLHttpRequest/#getallresponseheaders
*/
XMLHttpRequest.prototype.getAllResponseHeaders = function() {};
/**
* @param {string} header
* @return {string}
* @see http://www.w3.org/TR/XMLHttpRequest/#getresponseheader
*/
XMLHttpRequest.prototype.getResponseHeader = function(header) {};
/**
* @type {string}
* @see http://www.w3.org/TR/XMLHttpRequest/#responsetext
*/
XMLHttpRequest.prototype.responseText;
/**
* @type {Document}
* @see http://www.w3.org/TR/XMLHttpRequest/#responsexml
*/
XMLHttpRequest.prototype.responseXML;
/**
* @type {number}
* @see http://www.w3.org/TR/XMLHttpRequest/#readystate
*/
XMLHttpRequest.prototype.readyState;
/**
* @type {number}
* @see http://www.w3.org/TR/XMLHttpRequest/#status
*/
XMLHttpRequest.prototype.status;
/**
* @type {string}
* @see http://www.w3.org/TR/XMLHttpRequest/#statustext
*/
XMLHttpRequest.prototype.statusText;
/**
* @type {Function}
* @see http://www.w3.org/TR/XMLHttpRequest/#onreadystatechange
*/
XMLHttpRequest.prototype.onreadystatechange;
/**
* The FormData object represents an ordered collection of entries. Each entry
* has a name and value.
*
* @param {?Element=} opt_form An optional form to use for constructing the form
* data set.
* @constructor
* @see http://www.w3.org/TR/XMLHttpRequest2/#the-formdata-interface
*/
function FormData(opt_form) {}
/**
* @param {string} name
* @param {Blob|string} value
*/
FormData.prototype.append = function(name, value) {};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,457 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for WebKit's custom CSS properties. Copied from:
* {@link
* http://trac.webkit.org/browser/trunk/Source/WebCore/css/CSSPropertyNames.in}
*
* If you make changes to this file, notice that every property appears
* twice: once as an uppercase name and once as a lowercase name.
* WebKit allows both. The uppercase version is preferred.
*
* @externs
* @author nicksantos@google.com (Nick Santos)
* @author mastepien@google.com (Marek Stepien)
*/
/** @type {string} */ CSSProperties.prototype.WebkitAlignContent;
/** @type {string} */ CSSProperties.prototype.WebkitAlignItems;
/** @type {string} */ CSSProperties.prototype.WebkitAlignSelf;
/** @type {string} */ CSSProperties.prototype.WebkitAnimation;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationDelay;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationDirection;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationDuration;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationFillMode;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationIterationCount;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationName;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationPlayState;
/** @type {string} */ CSSProperties.prototype.WebkitAnimationTimingFunction;
/** @type {string} */ CSSProperties.prototype.WebkitAppearance;
/** @type {string} */ CSSProperties.prototype.WebkitAppRegion;
/** @type {string} */ CSSProperties.prototype.WebkitAspectRatio;
/** @type {string} */ CSSProperties.prototype.WebkitBackfaceVisibility;
/** @type {string} */ CSSProperties.prototype.WebkitBackgroundClip;
/** @type {string} */ CSSProperties.prototype.WebkitBackgroundComposite;
/** @type {string} */ CSSProperties.prototype.WebkitBackgroundOrigin;
/** @type {string} */ CSSProperties.prototype.WebkitBackgroundSize;
/** @type {string} */ CSSProperties.prototype.WebkitBinding;
/** @type {string} */ CSSProperties.prototype.WebkitBlendMode;
/** @type {string} */ CSSProperties.prototype.WebkitBorderAfter;
/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterColor;
/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterStyle;
/** @type {string} */ CSSProperties.prototype.WebkitBorderAfterWidth;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBefore;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeColor;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeStyle;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBeforeWidth;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBottomLeftRadius;
/** @type {string} */ CSSProperties.prototype.WebkitBorderBottomRightRadius;
/** @type {string} */ CSSProperties.prototype.WebkitBorderEnd;
/** @type {string} */ CSSProperties.prototype.WebkitBorderEndColor;
/** @type {string} */ CSSProperties.prototype.WebkitBorderEndStyle;
/** @type {string} */ CSSProperties.prototype.WebkitBorderEndWidth;
/** @type {string} */ CSSProperties.prototype.WebkitBorderFit;
/** @type {string} */ CSSProperties.prototype.WebkitBorderHorizontalSpacing;
/** @type {string} */ CSSProperties.prototype.WebkitBorderImage;
/** @type {string} */ CSSProperties.prototype.WebkitBorderRadius;
/** @type {string} */ CSSProperties.prototype.WebkitBorderStart;
/** @type {string} */ CSSProperties.prototype.WebkitBorderStartColor;
/** @type {string} */ CSSProperties.prototype.WebkitBorderStartStyle;
/** @type {string} */ CSSProperties.prototype.WebkitBorderStartWidth;
/** @type {string} */ CSSProperties.prototype.WebkitBorderTopLeftRadius;
/** @type {string} */ CSSProperties.prototype.WebkitBorderTopRightRadius;
/** @type {string} */ CSSProperties.prototype.WebkitBorderVerticalSpacing;
/** @type {string} */ CSSProperties.prototype.WebkitBoxAlign;
/** @type {string} */ CSSProperties.prototype.WebkitBoxDecorationBreak;
/** @type {string} */ CSSProperties.prototype.WebkitBoxDirection;
/** @type {string} */ CSSProperties.prototype.WebkitBoxFlex;
/** @type {string} */ CSSProperties.prototype.WebkitBoxFlexGroup;
/** @type {string} */ CSSProperties.prototype.WebkitBoxLines;
/** @type {string} */ CSSProperties.prototype.WebkitBoxOrdinalGroup;
/** @type {string} */ CSSProperties.prototype.WebkitBoxOrient;
/** @type {string} */ CSSProperties.prototype.WebkitBoxPack;
/** @type {string} */ CSSProperties.prototype.WebkitBoxReflect;
/** @type {string} */ CSSProperties.prototype.WebkitBoxShadow;
/** @type {string} */ CSSProperties.prototype.WebkitBoxSizing;
/** @type {string} */ CSSProperties.prototype.WebkitColorCorrection;
/** @type {string} */ CSSProperties.prototype.WebkitColumnAxis;
/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakAfter;
/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakBefore;
/** @type {string} */ CSSProperties.prototype.WebkitColumnBreakInside;
/** @type {string} */ CSSProperties.prototype.WebkitColumnCount;
/** @type {string} */ CSSProperties.prototype.WebkitColumnGap;
/** @type {string} */ CSSProperties.prototype.WebkitColumnProgression;
/** @type {string} */ CSSProperties.prototype.WebkitColumnRule;
/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleColor;
/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleStyle;
/** @type {string} */ CSSProperties.prototype.WebkitColumnRuleWidth;
/** @type {string} */ CSSProperties.prototype.WebkitColumns;
/** @type {string} */ CSSProperties.prototype.WebkitColumnSpan;
/** @type {string} */ CSSProperties.prototype.WebkitColumnWidth;
/** @type {string} */ CSSProperties.prototype.WebkitDashboardRegion;
/** @type {string} */ CSSProperties.prototype.WebkitFilter;
/** @type {string} */ CSSProperties.prototype.WebkitFlex;
/** @type {string} */ CSSProperties.prototype.WebkitFlexBasis;
/** @type {string} */ CSSProperties.prototype.WebkitFlexDirection;
/** @type {string} */ CSSProperties.prototype.WebkitFlexFlow;
/** @type {string} */ CSSProperties.prototype.WebkitFlexGrow;
/** @type {string} */ CSSProperties.prototype.WebkitFlexShrink;
/** @type {string} */ CSSProperties.prototype.WebkitFlexWrap;
/** @type {string} */ CSSProperties.prototype.WebkitFlowFrom;
/** @type {string} */ CSSProperties.prototype.WebkitFlowInto;
/** @type {string} */ CSSProperties.prototype.WebkitFontSizeDelta;
/** @type {string} */ CSSProperties.prototype.WebkitFontSmoothing;
/** @type {string} */ CSSProperties.prototype.WebkitGridColumn;
/** @type {string} */ CSSProperties.prototype.WebkitGridColumns;
/** @type {string} */ CSSProperties.prototype.WebkitGridRow;
/** @type {string} */ CSSProperties.prototype.WebkitGridRows;
/** @type {string} */ CSSProperties.prototype.WebkitHighlight;
/** @type {string} */ CSSProperties.prototype.WebkitHyphenateCharacter;
/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitAfter;
/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitBefore;
/** @type {string} */ CSSProperties.prototype.WebkitHyphenateLimitLines;
/** @type {string} */ CSSProperties.prototype.WebkitHyphens;
/** @type {string} */ CSSProperties.prototype.WebkitJustifyContent;
/** @type {string} */ CSSProperties.prototype.WebkitLineAlign;
/** @type {string} */ CSSProperties.prototype.WebkitLineBoxContain;
/** @type {string} */ CSSProperties.prototype.WebkitLineBreak;
/** @type {string} */ CSSProperties.prototype.WebkitLineClamp;
/** @type {string} */ CSSProperties.prototype.WebkitLineGrid;
/** @type {string} */ CSSProperties.prototype.WebkitLineSnap;
/** @type {string} */ CSSProperties.prototype.WebkitLocale;
/** @type {string} */ CSSProperties.prototype.WebkitLogicalHeight;
/** @type {string} */ CSSProperties.prototype.WebkitLogicalWidth;
/** @type {string} */ CSSProperties.prototype.WebkitMarginAfter;
/** @type {string} */ CSSProperties.prototype.WebkitMarginAfterCollapse;
/** @type {string} */ CSSProperties.prototype.WebkitMarginBefore;
/** @type {string} */ CSSProperties.prototype.WebkitMarginBeforeCollapse;
/** @type {string} */ CSSProperties.prototype.WebkitMarginBottomCollapse;
/** @type {string} */ CSSProperties.prototype.WebkitMarginCollapse;
/** @type {string} */ CSSProperties.prototype.WebkitMarginEnd;
/** @type {string} */ CSSProperties.prototype.WebkitMarginStart;
/** @type {string} */ CSSProperties.prototype.WebkitMarginTopCollapse;
/** @type {string} */ CSSProperties.prototype.WebkitMarquee;
/** @type {string} */ CSSProperties.prototype.WebkitMarqueeDirection;
/** @type {string} */ CSSProperties.prototype.WebkitMarqueeIncrement;
/** @type {string} */ CSSProperties.prototype.WebkitMarqueeRepetition;
/** @type {string} */ CSSProperties.prototype.WebkitMarqueeSpeed;
/** @type {string} */ CSSProperties.prototype.WebkitMarqueeStyle;
/** @type {string} */ CSSProperties.prototype.WebkitMask;
/** @type {string} */ CSSProperties.prototype.WebkitMaskAttachment;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImage;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageOutset;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageRepeat;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageSlice;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageSource;
/** @type {string} */ CSSProperties.prototype.WebkitMaskBoxImageWidth;
/** @type {string} */ CSSProperties.prototype.WebkitMaskClip;
/** @type {string} */ CSSProperties.prototype.WebkitMaskComposite;
/** @type {string} */ CSSProperties.prototype.WebkitMaskImage;
/** @type {string} */ CSSProperties.prototype.WebkitMaskOrigin;
/** @type {string} */ CSSProperties.prototype.WebkitMaskPosition;
/** @type {string} */ CSSProperties.prototype.WebkitMaskPositionX;
/** @type {string} */ CSSProperties.prototype.WebkitMaskPositionY;
/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeat;
/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeatX;
/** @type {string} */ CSSProperties.prototype.WebkitMaskRepeatY;
/** @type {string} */ CSSProperties.prototype.WebkitMaskSize;
/** @type {string} */
CSSProperties.prototype.WebkitMatchNearestMailBlockquoteColor;
/** @type {string} */ CSSProperties.prototype.WebkitMaxLogicalHeight;
/** @type {string} */ CSSProperties.prototype.WebkitMaxLogicalWidth;
/** @type {string} */ CSSProperties.prototype.WebkitMinLogicalHeight;
/** @type {string} */ CSSProperties.prototype.WebkitMinLogicalWidth;
/** @type {string} */ CSSProperties.prototype.WebkitNbspMode;
/** @type {string} */ CSSProperties.prototype.WebkitOrder;
/** @type {string} */ CSSProperties.prototype.WebkitOverflowScrolling;
/** @type {string} */ CSSProperties.prototype.WebkitPaddingAfter;
/** @type {string} */ CSSProperties.prototype.WebkitPaddingBefore;
/** @type {string} */ CSSProperties.prototype.WebkitPaddingEnd;
/** @type {string} */ CSSProperties.prototype.WebkitPaddingStart;
/** @type {string} */ CSSProperties.prototype.WebkitPerspective;
/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOrigin;
/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOriginX;
/** @type {string} */ CSSProperties.prototype.WebkitPerspectiveOriginY;
/** @type {string} */ CSSProperties.prototype.WebkitPrintColorAdjust;
/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakAfter;
/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakBefore;
/** @type {string} */ CSSProperties.prototype.WebkitRegionBreakInside;
/** @type {string} */ CSSProperties.prototype.WebkitRegionOverflow;
/** @type {string} */ CSSProperties.prototype.WebkitRtlOrdering;
/** @type {string} */ CSSProperties.prototype.WebkitRubyPosition;
/** @type {string} */ CSSProperties.prototype.WebkitShapeInside;
/** @type {string} */ CSSProperties.prototype.WebkitShapeMargin;
/** @type {string} */ CSSProperties.prototype.WebkitShapeOutside;
/** @type {string} */ CSSProperties.prototype.WebkitShapePadding;
/** @type {string} */ CSSProperties.prototype.WebkitTapHighlightColor;
/** @type {string} */ CSSProperties.prototype.WebkitTextAlignLast;
/** @type {string} */ CSSProperties.prototype.WebkitTextCombine;
/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationLine;
/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationsInEffect;
/** @type {string} */ CSSProperties.prototype.WebkitTextDecorationStyle;
/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasis;
/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisColor;
/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisPosition;
/** @type {string} */ CSSProperties.prototype.WebkitTextEmphasisStyle;
/** @type {string} */ CSSProperties.prototype.WebkitTextFillColor;
/** @type {string} */ CSSProperties.prototype.WebkitTextOrientation;
/** @type {string} */ CSSProperties.prototype.WebkitTextSecurity;
/** @type {string} */ CSSProperties.prototype.WebkitTextSizeAdjust;
/** @type {string} */ CSSProperties.prototype.WebkitTextStroke;
/** @type {string} */ CSSProperties.prototype.WebkitTextStrokeColor;
/** @type {string} */ CSSProperties.prototype.WebkitTextStrokeWidth;
/** @type {string} */ CSSProperties.prototype.WebkitTransform;
/** @type {string} */ CSSProperties.prototype.WebkitTransformOrigin;
/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginX;
/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginY;
/** @type {string} */ CSSProperties.prototype.WebkitTransformOriginZ;
/** @type {string} */ CSSProperties.prototype.WebkitTransformStyle;
/** @type {string} */ CSSProperties.prototype.WebkitTransition;
/** @type {string} */ CSSProperties.prototype.WebkitTransitionDelay;
/** @type {string} */ CSSProperties.prototype.WebkitTransitionDuration;
/** @type {string} */ CSSProperties.prototype.WebkitTransitionProperty;
/** @type {string} */ CSSProperties.prototype.WebkitTransitionRepeatCount;
/** @type {string} */ CSSProperties.prototype.WebkitTransitionTimingFunction;
/** @type {string} */ CSSProperties.prototype.WebkitUserDrag;
/** @type {string} */ CSSProperties.prototype.WebkitUserModify;
/** @type {string} */ CSSProperties.prototype.WebkitUserSelect;
/** @type {string} */ CSSProperties.prototype.WebkitWrap;
/** @type {string} */ CSSProperties.prototype.WebkitWrapFlow;
/** @type {string} */ CSSProperties.prototype.WebkitWrapThrough;
/** @type {string} */ CSSProperties.prototype.WebkitWritingMode;
// WebKit also adds bindings for the lowercase versions of these properties.
// The uppercase version is preferred.
/** @type {string} */ CSSProperties.prototype.webkitAlignContent;
/** @type {string} */ CSSProperties.prototype.webkitAlignItems;
/** @type {string} */ CSSProperties.prototype.webkitAlignSelf;
/** @type {string} */ CSSProperties.prototype.webkitAnimation;
/** @type {string} */ CSSProperties.prototype.webkitAnimationDelay;
/** @type {string} */ CSSProperties.prototype.webkitAnimationDirection;
/** @type {string} */ CSSProperties.prototype.webkitAnimationDuration;
/** @type {string} */ CSSProperties.prototype.webkitAnimationFillMode;
/** @type {string} */ CSSProperties.prototype.webkitAnimationIterationCount;
/** @type {string} */ CSSProperties.prototype.webkitAnimationName;
/** @type {string} */ CSSProperties.prototype.webkitAnimationPlayState;
/** @type {string} */ CSSProperties.prototype.webkitAnimationTimingFunction;
/** @type {string} */ CSSProperties.prototype.webkitAppearance;
/** @type {string} */ CSSProperties.prototype.webkitAppRegion;
/** @type {string} */ CSSProperties.prototype.webkitAspectRatio;
/** @type {string} */ CSSProperties.prototype.webkitBackfaceVisibility;
/** @type {string} */ CSSProperties.prototype.webkitBackgroundClip;
/** @type {string} */ CSSProperties.prototype.webkitBackgroundComposite;
/** @type {string} */ CSSProperties.prototype.webkitBackgroundOrigin;
/** @type {string} */ CSSProperties.prototype.webkitBackgroundSize;
/** @type {string} */ CSSProperties.prototype.webkitBinding;
/** @type {string} */ CSSProperties.prototype.webkitBlendMode;
/** @type {string} */ CSSProperties.prototype.webkitBorderAfter;
/** @type {string} */ CSSProperties.prototype.webkitBorderAfterColor;
/** @type {string} */ CSSProperties.prototype.webkitBorderAfterStyle;
/** @type {string} */ CSSProperties.prototype.webkitBorderAfterWidth;
/** @type {string} */ CSSProperties.prototype.webkitBorderBefore;
/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeColor;
/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeStyle;
/** @type {string} */ CSSProperties.prototype.webkitBorderBeforeWidth;
/** @type {string} */ CSSProperties.prototype.webkitBorderBottomLeftRadius;
/** @type {string} */ CSSProperties.prototype.webkitBorderBottomRightRadius;
/** @type {string} */ CSSProperties.prototype.webkitBorderEnd;
/** @type {string} */ CSSProperties.prototype.webkitBorderEndColor;
/** @type {string} */ CSSProperties.prototype.webkitBorderEndStyle;
/** @type {string} */ CSSProperties.prototype.webkitBorderEndWidth;
/** @type {string} */ CSSProperties.prototype.webkitBorderFit;
/** @type {string} */ CSSProperties.prototype.webkitBorderHorizontalSpacing;
/** @type {string} */ CSSProperties.prototype.webkitBorderImage;
/** @type {string} */ CSSProperties.prototype.webkitBorderRadius;
/** @type {string} */ CSSProperties.prototype.webkitBorderStart;
/** @type {string} */ CSSProperties.prototype.webkitBorderStartColor;
/** @type {string} */ CSSProperties.prototype.webkitBorderStartStyle;
/** @type {string} */ CSSProperties.prototype.webkitBorderStartWidth;
/** @type {string} */ CSSProperties.prototype.webkitBorderTopLeftRadius;
/** @type {string} */ CSSProperties.prototype.webkitBorderTopRightRadius;
/** @type {string} */ CSSProperties.prototype.webkitBorderVerticalSpacing;
/** @type {string} */ CSSProperties.prototype.webkitBoxAlign;
/** @type {string} */ CSSProperties.prototype.webkitBoxDecorationBreak;
/** @type {string} */ CSSProperties.prototype.webkitBoxDirection;
/** @type {string} */ CSSProperties.prototype.webkitBoxFlex;
/** @type {string} */ CSSProperties.prototype.webkitBoxFlexGroup;
/** @type {string} */ CSSProperties.prototype.webkitBoxLines;
/** @type {string} */ CSSProperties.prototype.webkitBoxOrdinalGroup;
/** @type {string} */ CSSProperties.prototype.webkitBoxOrient;
/** @type {string} */ CSSProperties.prototype.webkitBoxPack;
/** @type {string} */ CSSProperties.prototype.webkitBoxReflect;
/** @type {string} */ CSSProperties.prototype.webkitBoxShadow;
/** @type {string} */ CSSProperties.prototype.webkitBoxSizing;
/** @type {string} */ CSSProperties.prototype.webkitColorCorrection;
/** @type {string} */ CSSProperties.prototype.webkitColumnAxis;
/** @type {string} */ CSSProperties.prototype.webkitColumnBreakAfter;
/** @type {string} */ CSSProperties.prototype.webkitColumnBreakBefore;
/** @type {string} */ CSSProperties.prototype.webkitColumnBreakInside;
/** @type {string} */ CSSProperties.prototype.webkitColumnCount;
/** @type {string} */ CSSProperties.prototype.webkitColumnGap;
/** @type {string} */ CSSProperties.prototype.webkitColumnProgression;
/** @type {string} */ CSSProperties.prototype.webkitColumnRule;
/** @type {string} */ CSSProperties.prototype.webkitColumnRuleColor;
/** @type {string} */ CSSProperties.prototype.webkitColumnRuleStyle;
/** @type {string} */ CSSProperties.prototype.webkitColumnRuleWidth;
/** @type {string} */ CSSProperties.prototype.webkitColumns;
/** @type {string} */ CSSProperties.prototype.webkitColumnSpan;
/** @type {string} */ CSSProperties.prototype.webkitColumnWidth;
/** @type {string} */ CSSProperties.prototype.webkitDashboardRegion;
/** @type {string} */ CSSProperties.prototype.webkitFilter;
/** @type {string} */ CSSProperties.prototype.webkitFlex;
/** @type {string} */ CSSProperties.prototype.webkitFlexBasis;
/** @type {string} */ CSSProperties.prototype.webkitFlexDirection;
/** @type {string} */ CSSProperties.prototype.webkitFlexFlow;
/** @type {string} */ CSSProperties.prototype.webkitFlexGrow;
/** @type {string} */ CSSProperties.prototype.webkitFlexShrink;
/** @type {string} */ CSSProperties.prototype.webkitFlexWrap;
/** @type {string} */ CSSProperties.prototype.webkitFlowFrom;
/** @type {string} */ CSSProperties.prototype.webkitFlowInto;
/** @type {string} */ CSSProperties.prototype.webkitFontSizeDelta;
/** @type {string} */ CSSProperties.prototype.webkitFontSmoothing;
/** @type {string} */ CSSProperties.prototype.webkitGridColumn;
/** @type {string} */ CSSProperties.prototype.webkitGridColumns;
/** @type {string} */ CSSProperties.prototype.webkitGridRow;
/** @type {string} */ CSSProperties.prototype.webkitGridRows;
/** @type {string} */ CSSProperties.prototype.webkitHighlight;
/** @type {string} */ CSSProperties.prototype.webkitHyphenateCharacter;
/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitAfter;
/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitBefore;
/** @type {string} */ CSSProperties.prototype.webkitHyphenateLimitLines;
/** @type {string} */ CSSProperties.prototype.webkitHyphens;
/** @type {string} */ CSSProperties.prototype.webkitJustifyContent;
/** @type {string} */ CSSProperties.prototype.webkitLineAlign;
/** @type {string} */ CSSProperties.prototype.webkitLineBoxContain;
/** @type {string} */ CSSProperties.prototype.webkitLineBreak;
/** @type {string} */ CSSProperties.prototype.webkitLineClamp;
/** @type {string} */ CSSProperties.prototype.webkitLineGrid;
/** @type {string} */ CSSProperties.prototype.webkitLineSnap;
/** @type {string} */ CSSProperties.prototype.webkitLocale;
/** @type {string} */ CSSProperties.prototype.webkitLogicalHeight;
/** @type {string} */ CSSProperties.prototype.webkitLogicalWidth;
/** @type {string} */ CSSProperties.prototype.webkitMarginAfter;
/** @type {string} */ CSSProperties.prototype.webkitMarginAfterCollapse;
/** @type {string} */ CSSProperties.prototype.webkitMarginBefore;
/** @type {string} */ CSSProperties.prototype.webkitMarginBeforeCollapse;
/** @type {string} */ CSSProperties.prototype.webkitMarginBottomCollapse;
/** @type {string} */ CSSProperties.prototype.webkitMarginCollapse;
/** @type {string} */ CSSProperties.prototype.webkitMarginEnd;
/** @type {string} */ CSSProperties.prototype.webkitMarginStart;
/** @type {string} */ CSSProperties.prototype.webkitMarginTopCollapse;
/** @type {string} */ CSSProperties.prototype.webkitMarquee;
/** @type {string} */ CSSProperties.prototype.webkitMarqueeDirection;
/** @type {string} */ CSSProperties.prototype.webkitMarqueeIncrement;
/** @type {string} */ CSSProperties.prototype.webkitMarqueeRepetition;
/** @type {string} */ CSSProperties.prototype.webkitMarqueeSpeed;
/** @type {string} */ CSSProperties.prototype.webkitMarqueeStyle;
/** @type {string} */ CSSProperties.prototype.webkitMask;
/** @type {string} */ CSSProperties.prototype.webkitMaskAttachment;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImage;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageOutset;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageRepeat;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageSlice;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageSource;
/** @type {string} */ CSSProperties.prototype.webkitMaskBoxImageWidth;
/** @type {string} */ CSSProperties.prototype.webkitMaskClip;
/** @type {string} */ CSSProperties.prototype.webkitMaskComposite;
/** @type {string} */ CSSProperties.prototype.webkitMaskImage;
/** @type {string} */ CSSProperties.prototype.webkitMaskOrigin;
/** @type {string} */ CSSProperties.prototype.webkitMaskPosition;
/** @type {string} */ CSSProperties.prototype.webkitMaskPositionX;
/** @type {string} */ CSSProperties.prototype.webkitMaskPositionY;
/** @type {string} */ CSSProperties.prototype.webkitMaskRepeat;
/** @type {string} */ CSSProperties.prototype.webkitMaskRepeatX;
/** @type {string} */ CSSProperties.prototype.webkitMaskRepeatY;
/** @type {string} */ CSSProperties.prototype.webkitMaskSize;
/** @type {string} */
CSSProperties.prototype.webkitMatchNearestMailBlockquoteColor;
/** @type {string} */ CSSProperties.prototype.webkitMaxLogicalHeight;
/** @type {string} */ CSSProperties.prototype.webkitMaxLogicalWidth;
/** @type {string} */ CSSProperties.prototype.webkitMinLogicalHeight;
/** @type {string} */ CSSProperties.prototype.webkitMinLogicalWidth;
/** @type {string} */ CSSProperties.prototype.webkitNbspMode;
/** @type {string} */ CSSProperties.prototype.webkitOrder;
/** @type {string} */ CSSProperties.prototype.webkitOverflowScrolling;
/** @type {string} */ CSSProperties.prototype.webkitPaddingAfter;
/** @type {string} */ CSSProperties.prototype.webkitPaddingBefore;
/** @type {string} */ CSSProperties.prototype.webkitPaddingEnd;
/** @type {string} */ CSSProperties.prototype.webkitPaddingStart;
/** @type {string} */ CSSProperties.prototype.webkitPerspective;
/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOrigin;
/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOriginX;
/** @type {string} */ CSSProperties.prototype.webkitPerspectiveOriginY;
/** @type {string} */ CSSProperties.prototype.webkitPrintColorAdjust;
/** @type {string} */ CSSProperties.prototype.webkitRegionBreakAfter;
/** @type {string} */ CSSProperties.prototype.webkitRegionBreakBefore;
/** @type {string} */ CSSProperties.prototype.webkitRegionBreakInside;
/** @type {string} */ CSSProperties.prototype.webkitRegionOverflow;
/** @type {string} */ CSSProperties.prototype.webkitRtlOrdering;
/** @type {string} */ CSSProperties.prototype.webkitRubyPosition;
/** @type {string} */ CSSProperties.prototype.webkitShapeInside;
/** @type {string} */ CSSProperties.prototype.webkitShapeMargin;
/** @type {string} */ CSSProperties.prototype.webkitShapeOutside;
/** @type {string} */ CSSProperties.prototype.webkitShapePadding;
/** @type {string} */ CSSProperties.prototype.webkitTapHighlightColor;
/** @type {string} */ CSSProperties.prototype.webkitTextAlignLast;
/** @type {string} */ CSSProperties.prototype.webkitTextCombine;
/** @type {string} */ CSSProperties.prototype.webkitTextDecorationLine;
/** @type {string} */ CSSProperties.prototype.webkitTextDecorationsInEffect;
/** @type {string} */ CSSProperties.prototype.webkitTextDecorationStyle;
/** @type {string} */ CSSProperties.prototype.webkitTextEmphasis;
/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisColor;
/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisPosition;
/** @type {string} */ CSSProperties.prototype.webkitTextEmphasisStyle;
/** @type {string} */ CSSProperties.prototype.webkitTextFillColor;
/** @type {string} */ CSSProperties.prototype.webkitTextOrientation;
/** @type {string} */ CSSProperties.prototype.webkitTextSecurity;
/** @type {string} */ CSSProperties.prototype.webkitTextSizeAdjust;
/** @type {string} */ CSSProperties.prototype.webkitTextStroke;
/** @type {string} */ CSSProperties.prototype.webkitTextStrokeColor;
/** @type {string} */ CSSProperties.prototype.webkitTextStrokeWidth;
/** @type {string} */ CSSProperties.prototype.webkitTransform;
/** @type {string} */ CSSProperties.prototype.webkitTransformOrigin;
/** @type {string} */ CSSProperties.prototype.webkitTransformOriginX;
/** @type {string} */ CSSProperties.prototype.webkitTransformOriginY;
/** @type {string} */ CSSProperties.prototype.webkitTransformOriginZ;
/** @type {string} */ CSSProperties.prototype.webkitTransformStyle;
/** @type {string} */ CSSProperties.prototype.webkitTransition;
/** @type {string} */ CSSProperties.prototype.webkitTransitionDelay;
/** @type {string} */ CSSProperties.prototype.webkitTransitionDuration;
/** @type {string} */ CSSProperties.prototype.webkitTransitionProperty;
/** @type {string} */ CSSProperties.prototype.webkitTransitionRepeatCount;
/** @type {string} */ CSSProperties.prototype.webkitTransitionTimingFunction;
/** @type {string} */ CSSProperties.prototype.webkitUserDrag;
/** @type {string} */ CSSProperties.prototype.webkitUserModify;
/** @type {string} */ CSSProperties.prototype.webkitUserSelect;
/** @type {string} */ CSSProperties.prototype.webkitWrap;
/** @type {string} */ CSSProperties.prototype.webkitWrapFlow;
/** @type {string} */ CSSProperties.prototype.webkitWrapThrough;
/** @type {string} */ CSSProperties.prototype.webkitWritingMode;
/**
* @constructor
* @param {number} x
* @param {number} y
*/
function WebKitPoint(x, y) {}
/** @type {number} */
WebKitPoint.prototype.x;
/** @type {number} */
WebKitPoint.prototype.y;

View File

@ -0,0 +1,258 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over W3C's DOM
* specification by WebKit. This file depends on w3c_dom2.js.
* All the provided definitions has been type annotated
*
* @externs
*/
/**
* @constructor
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/MemoryInfo.idl
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/MemoryInfo.cpp
*/
function MemoryInfo() {};
/** @type {number} */
MemoryInfo.prototype.totalJSHeapSize;
/** @type {number} */
MemoryInfo.prototype.usedJSHeapSize;
/** @type {number} */
MemoryInfo.prototype.jsHeapSizeLimit;
/**
* @constructor
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfileNode.idl
*/
function ScriptProfileNode() {};
/** @type {string} */
ScriptProfileNode.prototype.functionName;
/** @type {string} */
ScriptProfileNode.prototype.url;
/** @type {number} */
ScriptProfileNode.prototype.lineNumber;
/** @type {number} */
ScriptProfileNode.prototype.totalTime;
/** @type {number} */
ScriptProfileNode.prototype.selfTime;
/** @type {number} */
ScriptProfileNode.prototype.numberOfCalls;
/** @type {Array.<ScriptProfileNode>} */
ScriptProfileNode.prototype.children;
/** @type {boolean} */
ScriptProfileNode.prototype.visible;
/** @type {number} */
ScriptProfileNode.prototype.callUID;
/**
* @constructor
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfile.idl
*/
function ScriptProfile() {};
/** @type {string} */
ScriptProfile.prototype.title;
/** @type {number} */
ScriptProfile.prototype.uid;
/** @type {ScriptProfileNode} */
ScriptProfile.prototype.head;
/**
* @constructor
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/Console.idl
* @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/Console.cpp
*/
function Console() {};
/**
* @param {*} condition
* @param {...*} var_args
*/
Console.prototype.assert = function(condition, var_args) {};
/**
* @param {...*} var_args
*/
Console.prototype.error = function(var_args) {};
/**
* @param {...*} var_args
*/
Console.prototype.info = function(var_args) {};
/**
* @param {...*} var_args
*/
Console.prototype.log = function(var_args) {};
/**
* @param {...*} var_args
*/
Console.prototype.warn = function(var_args) {};
/**
* @param {...*} var_args
*/
Console.prototype.debug = function(var_args) {};
/**
* @param {*} value
*/
Console.prototype.dir = function(value) {};
/**
* @param {...*} var_args
*/
Console.prototype.dirxml = function(var_args) {};
/**
* @return {undefined}
*/
Console.prototype.trace = function() {};
/**
* @param {*} value
*/
Console.prototype.count = function(value) {};
/**
* @param {*} value
*/
Console.prototype.markTimeline = function(value) {};
/**
* @param {string=} opt_title
*/
Console.prototype.profile = function(opt_title) {};
/** @type {Array.<ScriptProfile>} */
Console.prototype.profiles;
Console.prototype.profileEnd = function() {};
/**
* @param {string} name
*/
Console.prototype.time = function(name) {};
/**
* @param {string} name
*/
Console.prototype.timeEnd = function(name) {};
/**
* @param {*} value
*/
Console.prototype.timeStamp = function(value) {};
/**
* @param {...*} var_args
*/
Console.prototype.group = function(var_args) {};
Console.prototype.groupEnd = function() {};
/** @type {MemoryInfo} */
Console.prototype.memory;
/** @type {Console} */
Window.prototype.console;
/**
* @type {number}
* @see http://developer.android.com/reference/android/webkit/WebView.html
*/
Window.prototype.devicePixelRatio;
/** @type {Node} */
Selection.prototype.baseNode;
/** @type {number} */
Selection.prototype.baseOffset;
/** @type {Node} */
Selection.prototype.extentNode;
/** @type {number} */
Selection.prototype.extentOffset;
/** @type {string} */
Selection.prototype.type;
/**
* @return {undefined}
*/
Selection.prototype.empty = function() {};
/**
* @param {Node} baseNode
* @param {number} baseOffset
* @param {Node} extentNode
* @param {number} extentOffset
* @return {undefined}
*/
Selection.prototype.setBaseAndExtent =
function(baseNode, baseOffset, extentNode, extentOffset) {};
/**
* @param {string} alter
* @param {string} direction
* @param {string} granularity
* @return {undefined}
*/
Selection.prototype.modify = function(alter, direction, granularity) {};
/**
* @param {Element} element
* @param {string} pseudoElement
* @param {boolean=} opt_authorOnly
* @return {CSSRuleList}
* @nosideeffects
*/
ViewCSS.prototype.getMatchedCSSRules =
function(element, pseudoElement, opt_authorOnly) {};
/**
* @param {string} contextId
* @param {string} name
* @param {number} width
* @param {number} height
* @nosideeffects
*/
Document.prototype.getCSSCanvasContext =
function(contextId, name, width, height) {};
/**
* @type {string}
* @see http://code.google.com/chrome/whitepapers/pagevisibility.html
*/
Document.prototype.webkitVisibilityState;

View File

@ -0,0 +1,48 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for all the extensions over W3C's
* event specification by WebKit. This file depends on w3c_event.js.
* All the provided definitions have been type annotated
*
* @externs
*/
/** @type {number} */
Event.prototype.wheelDeltaX;
/** @type {number} */
Event.prototype.wheelDeltaY;
/**
* @constructor
* @extends {Event}
* @see http://developer.apple.com/library/safari/documentation/AudioVideo/Reference/WebKitAnimationEventClassReference/WebKitAnimationEvent/WebKitAnimationEvent.html
*/
function WebKitAnimationEvent() {}
/**
* @type {string}
* @const
*/
WebKitAnimationEvent.prototype.animationName;
/**
* @type {number}
* @const
*/
WebKitAnimationEvent.prototype.elapsedTime;

View File

@ -0,0 +1,131 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's Notifications specification.
* @externs
*/
/**
* @constructor
* @implements {EventTarget}
* @see http://dev.w3.org/2006/webapi/WebNotifications/publish/#idl-if-Notification
*/
function Notification() {}
/** @override */
Notification.prototype.addEventListener =
function(type, listener, useCapture) {};
/** @override */
Notification.prototype.removeEventListener =
function(type, listener, useCapture) {};
/** @override */
Notification.prototype.dispatchEvent = function(evt) {};
/**
* The ID used by clients to uniquely identify notifications to eliminate
* duplicate notifications.
* @type {string}
*/
Notification.prototype.replaceId;
/**
* The string used by clients to specify the directionality (rtl/ltr) of the
* notification.
* @type {string}
* @see http://dev.w3.org/2006/webapi/WebNotifications/publish/Notifications.html#dfn-dir
*/
Notification.prototype.dir;
/**
* Displays the notification.
*/
Notification.prototype.show = function() {};
/**
* Prevents the notification from being displayed, or closes it if it is already
* displayed.
*/
Notification.prototype.cancel = function() {};
/**
* An event handler called when notification is closed.
* @type {?function(Event)}
*/
Notification.prototype.onclose;
/**
* An event handler called if the notification could not be displayed due to
* an error (i.e. resource could not be loaded).
* @type {?function(Event)}
*/
Notification.prototype.onerror;
/**
* An event handler called when the notification has become visible.
* @type {?function(Event)}
*/
Notification.prototype.ondisplay;
/**
* An event handler called when the notification has been clicked on.
* @type {?function(Event)}
*/
Notification.prototype.onclick;
/**
* @constructor
* @see http://dev.w3.org/2006/webapi/WebNotifications/publish/#dialog-if
*/
function NotificationCenter() {}
/**
* Creates a text+icon notification and displays it to the user.
* @param {string} iconUrl
* @param {string} title
* @param {string} body
* @return {Notification}
*/
NotificationCenter.prototype.createNotification =
function(iconUrl, title, body) {};
/**
* Creates an HTML notification and displays it to the user.
* @param {string} url
* @return {Notification}
*/
NotificationCenter.prototype.createHTMLNotification = function(url) {};
/**
* Checks if the user has permission to display notifications.
* @return {number}
*/
NotificationCenter.prototype.checkPermission = function() {};
/**
* Requests permission from the user to display notifications.
* @param {Function=} opt_callback
* @return {void}
*/
NotificationCenter.prototype.requestPermission = function(opt_callback) {};
/**
* WebKit browsers expose the NotificationCenter API through
* window.webkitNotifications.
* @type {NotificationCenter}
*/
Window.prototype.webkitNotifications;

View File

@ -0,0 +1,148 @@
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for W3C's WebStorage specification.
* This file depends on html5.js.
* @externs
*/
/**
* @interface
* @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-storage-interface
*/
function Storage() {}
/**
* @type {number}
* @const
*/
Storage.prototype.length;
/**
* @param {number} index
* @return {?string}
*/
Storage.prototype.key = function(index) {};
/**
* @param {string} key
* @return {?string}
*/
Storage.prototype.getItem = function(key) {};
/**
* @param {string} key
* @param {string} data
* @return {void}
*/
Storage.prototype.setItem = function(key, data) {};
/**
* @param {string} key
* @return {void}
*/
Storage.prototype.removeItem = function(key) {};
/**
* @return {void}
*/
Storage.prototype.clear = function() {};
/**
* @interface
* @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-sessionstorage-attribute
*/
function WindowSessionStorage() {}
/**
* @type {Storage}
*/
WindowSessionStorage.prototype.sessionStorage;
/**
* Window implements WindowSessionStorage
*
* @type {Storage}
*/
Window.prototype.sessionStorage;
/**
* @interface
* @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-localstorage-attribute
*/
function WindowLocalStorage() {}
/**
* @type {Storage}
*/
WindowLocalStorage.prototype.localStorage;
/**
* Window implements WindowLocalStorage
*
* @type {Storage}
*/
Window.prototype.localStorage;
/**
* This is the storage event interface.
* @see http://www.w3.org/TR/2011/CR-webstorage-20111208/#the-storage-event
* @extends {Event}
* @constructor
*/
function StorageEvent() {}
/**
* @type {string}
*/
StorageEvent.prototype.key;
/**
* @type {?string}
*/
StorageEvent.prototype.oldValue;
/**
* @type {?string}
*/
StorageEvent.prototype.newValue;
/**
* @type {string}
*/
StorageEvent.prototype.url;
/**
* @type {?Storage}
*/
StorageEvent.prototype.storageArea;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {string} keyArg
* @param {?string} oldValueArg
* @param {?string} newValueArg
* @param {string} urlArg
* @param {?Storage} storageAreaArg
* @return {void}
*/
StorageEvent.prototype.initStorageEvent = function(typeArg, canBubbleArg,
cancelableArg, keyArg,
oldValueArg, newValueArg,
urlArg, storageAreaArg) {};

View File

@ -0,0 +1,175 @@
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview JavaScript Built-Ins for windows properties.
*
* @externs
*/
// Window properties
// Only common properties are here. Others such as open()
// should be used with an explicit Window object.
/**
* @type {!Window}
* @see https://developer.mozilla.org/en/DOM/window.top
* @const
*/
var top;
/**
* @type {Navigator}
* @see https://developer.mozilla.org/en/DOM/window.navigator
* @const
*/
var navigator;
/**
* @type {!HTMLDocument}
* @see https://developer.mozilla.org/en/DOM/window.document
* @const
*/
var document;
/**
* @type {Location}
* @see https://developer.mozilla.org/en/DOM/window.location
* @const
* @suppress {duplicate}
*/
var location;
/**
* @see https://developer.mozilla.org/En/DOM/Window.screen
* @const
*/
var screen;
/**
* @type {!Window}
* @see https://developer.mozilla.org/En/DOM/Window.self
* @const
*/
var self;
// Magic functions for Firefox's LiveConnect.
// We'll probably never use these in practice. But redefining them
// will fire up the JVM, so we want to reserve the symbol names.
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaArray
*/
var JavaArray;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaClass
*/
var JavaClass;
// We just ripped this from the FF source; it doesn't appear to be
// publicly documented.
var JavaMember;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaObject
*/
var JavaObject;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/JavaPackage
*/
var JavaPackage;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Packages
*/
var Packages;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/java
*/
var java;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/netscape
*/
var netscape;
/**
* @see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/sun
*/
var sun;
// Magic variable for Norton Identity Protection's Chrome extension. This
// program will overwrite whatever's stored in the variable 'o' with random
// values, so we want to avoid it.
// NOTE(user): Added 8-30-2012. We may want to remove this once Norton
// Identity Protection has been fixed and pushed to most people.
var o;
/**
* @see https://developer.mozilla.org/en/DOM/window.alert
*/
function alert(x) {}
/**
* @param {number|undefined?} intervalID
* @see https://developer.mozilla.org/en/DOM/window.clearInterval
*/
function clearInterval(intervalID) {}
/**
* @param {number|undefined?} timeoutID
* @see https://developer.mozilla.org/en/DOM/window.clearTimeout
*/
function clearTimeout(timeoutID) {}
/**
* @see https://developer.mozilla.org/en/DOM/window.confirm
*/
function confirm(x) {}
/**
* @see https://developer.mozilla.org/en/DOM/window.dump
*/
function dump(x) {}
/**
* @param {string} message
* @param {string=} opt_value
* @return {?string}
* @see https://developer.mozilla.org/en/DOM/window.prompt
*/
function prompt(message, opt_value) {}
/**
* @param {Function|string} callback
* @param {number} delay
* @return {number}
* @see https://developer.mozilla.org/en/DOM/window.setInterval
* @see https://msdn.microsoft.com/en-us/library/ms536749(v=VS.85).aspx
*/
function setInterval(callback, delay) {}
/**
* @param {Function|string} callback
* @param {number} delay
* @return {number}
* @see https://developer.mozilla.org/en/DOM/window.setTimeout
* @see https://msdn.microsoft.com/en-us/library/ms536753(VS.85).aspx
*/
function setTimeout(callback, delay) {}

Some files were not shown because too many files have changed in this diff Show More