Use // for single line comments

This commit is contained in:
Kevin Sawicki 2016-01-14 10:35:29 -08:00
parent 26350f4ccb
commit f4af744519
43 changed files with 311 additions and 310 deletions

View file

@ -11,7 +11,7 @@ webViewConstants = require('./web-view-constants');
remote = require('electron').remote;
/* Helper function to resolve url set in attribute. */
// Helper function to resolve url set in attribute.
a = document.createElement('a');
@ -36,21 +36,21 @@ WebViewAttribute = (function() {
}
/* Retrieves and returns the attribute's value. */
// Retrieves and returns the attribute's value.
WebViewAttribute.prototype.getValue = function() {
return this.webViewImpl.webviewNode.getAttribute(this.name) || this.value;
};
/* Sets the attribute's value. */
// Sets the attribute's value.
WebViewAttribute.prototype.setValue = function(value) {
return this.webViewImpl.webviewNode.setAttribute(this.name, value || '');
};
/* Changes the attribute's value without triggering its mutation handler. */
// Changes the attribute's value without triggering its mutation handler.
WebViewAttribute.prototype.setValueIgnoreMutation = function(value) {
this.ignoreMutation = true;
@ -59,7 +59,7 @@ WebViewAttribute = (function() {
};
/* Defines this attribute as a property on the webview node. */
// Defines this attribute as a property on the webview node.
WebViewAttribute.prototype.defineProperty = function() {
return Object.defineProperty(this.webViewImpl.webviewNode, this.name, {
@ -78,7 +78,7 @@ WebViewAttribute = (function() {
};
/* Called when the attribute's value changes. */
// Called when the attribute's value changes.
WebViewAttribute.prototype.handleMutation = function() {};
@ -87,7 +87,7 @@ WebViewAttribute = (function() {
})();
/* An attribute that is treated as a Boolean. */
// An attribute that is treated as a Boolean.
BooleanAttribute = (function(superClass) {
extend(BooleanAttribute, superClass);
@ -113,7 +113,7 @@ BooleanAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute that specifies whether transparency is allowed in the webview. */
// Attribute that specifies whether transparency is allowed in the webview.
AllowTransparencyAttribute = (function(superClass) {
extend(AllowTransparencyAttribute, superClass);
@ -134,7 +134,7 @@ AllowTransparencyAttribute = (function(superClass) {
})(BooleanAttribute);
/* Attribute used to define the demension limits of autosizing. */
// Attribute used to define the demension limits of autosizing.
AutosizeDimensionAttribute = (function(superClass) {
extend(AutosizeDimensionAttribute, superClass);
@ -169,7 +169,7 @@ AutosizeDimensionAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute that specifies whether the webview should be autosized. */
// Attribute that specifies whether the webview should be autosized.
AutosizeAttribute = (function(superClass) {
extend(AutosizeAttribute, superClass);
@ -185,7 +185,7 @@ AutosizeAttribute = (function(superClass) {
})(BooleanAttribute);
/* Attribute representing the state of the storage partition. */
// Attribute representing the state of the storage partition.
PartitionAttribute = (function(superClass) {
extend(PartitionAttribute, superClass);
@ -198,7 +198,7 @@ PartitionAttribute = (function(superClass) {
PartitionAttribute.prototype.handleMutation = function(oldValue, newValue) {
newValue = newValue || '';
/* The partition cannot change if the webview has already navigated. */
// The partition cannot change if the webview has already navigated.
if (!this.webViewImpl.beforeFirstNavigation) {
window.console.error(webViewConstants.ERROR_MSG_ALREADY_NAVIGATED);
this.setValueIgnoreMutation(oldValue);
@ -215,7 +215,7 @@ PartitionAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute that handles the location and navigation of the webview. */
// Attribute that handles the location and navigation of the webview.
SrcAttribute = (function(superClass) {
extend(SrcAttribute, superClass);
@ -310,7 +310,7 @@ SrcAttribute = (function(superClass) {
return;
}
/* Navigate to |this.src|. */
// Navigate to |this.src|.
opts = {};
httpreferrer = this.webViewImpl.attributes[webViewConstants.ATTRIBUTE_HTTPREFERRER].getValue();
if (httpreferrer) {
@ -329,7 +329,7 @@ SrcAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute specifies HTTP referrer. */
// Attribute specifies HTTP referrer.
HttpReferrerAttribute = (function(superClass) {
extend(HttpReferrerAttribute, superClass);
@ -343,7 +343,7 @@ HttpReferrerAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute specifies user agent */
// Attribute specifies user agent
UserAgentAttribute = (function(superClass) {
extend(UserAgentAttribute, superClass);
@ -357,7 +357,7 @@ UserAgentAttribute = (function(superClass) {
})(WebViewAttribute);
/* Attribute that set preload script. */
// Attribute that set preload script.
PreloadAttribute = (function(superClass) {
extend(PreloadAttribute, superClass);
@ -385,7 +385,7 @@ PreloadAttribute = (function(superClass) {
})(WebViewAttribute);
/* Sets up all of the webview attributes. */
// Sets up all of the webview attributes.
WebViewImpl.prototype.setupWebViewAttributes = function() {
var attribute, autosizeAttributes, i, len, results;