Skip to content

Commit

Permalink
Adding referrerPolicy externs.
Browse files Browse the repository at this point in the history
Based on https://w3c.github.io/webappsec-referrer-policy/

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=227927697
  • Loading branch information
seafuj authored and lauraharker committed Jan 7, 2019
1 parent 52f2a96 commit 3df2370
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
6 changes: 0 additions & 6 deletions externs/browser/w3c_dom2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1766,12 +1766,6 @@ HTMLImageElement.prototype.lowSrc;
*/
HTMLImageElement.prototype.name;

/**
* @type {string}
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy
*/
HTMLImageElement.prototype.referrerPolicy;

/**
* @type {string}
* @implicitCast
Expand Down
36 changes: 36 additions & 0 deletions externs/browser/w3c_referrer_policy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2018 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 W3C's referrer policy specification.
* @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery
* @externs
*/

/** @type {string} */
HTMLAnchorElement.prototype.referrerPolicy;

/** @type {string} */
HTMLAreaElement.prototype.referrerPolicy;

/** @type {string} */
HTMLImageElement.prototype.referrerPolicy;

/** @type {string} */
HTMLIFrameElement.prototype.referrerPolicy;

/** @type {string} */
HTMLLinkElement.prototype.referrerPolicy;
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/resources.json

Large diffs are not rendered by default.

0 comments on commit 3df2370

Please sign in to comment.