Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Security Part 1 #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
@@ -0,0 +1 @@
dist
5 changes: 4 additions & 1 deletion .eslintrc
Expand Up @@ -36,7 +36,10 @@
"no-multiple-empty-lines": ["error", {"max": 1}],
"no-undef": ["error"],
"no-var": ["off"],
"object-curly-spacing": ["error", "never"],
"object-curly-spacing": [
"error",
"never"
],
"one-var": ["off"],
"prefer-rest-params": ["off"],
"prefer-spread": ["off"],
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
@@ -0,0 +1,4 @@
{
"maxLength": 120,
"singleQuote": true
}
757 changes: 36 additions & 721 deletions dist/polaris.polyfill.legacy.prod.en.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.legacy.prod.es.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.legacy.staging.en.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.legacy.staging.es.js

Large diffs are not rendered by default.

757 changes: 36 additions & 721 deletions dist/polaris.polyfill.prod.en.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.prod.es.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.staging.en.js

Large diffs are not rendered by default.

62 changes: 34 additions & 28 deletions dist/polaris.polyfill.staging.es.js

Large diffs are not rendered by default.

695 changes: 2 additions & 693 deletions dist/polaris.prod.en.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions elements/xc-base.js
Expand Up @@ -29,7 +29,7 @@ export default function XCBaseMixin(base) {
attributeChangedCallback(name, oldValue, newValue) {
var handler = this[this._attrToCamel(name) + 'Changed'];
this._properties[name] = newValue === '' || newValue === 'true' || newValue;
if(handler && this._connected) {
if (handler && this._connected) {
handler.call(this, oldValue, this._properties[name]);
}
}
Expand All @@ -47,7 +47,7 @@ export default function XCBaseMixin(base) {
this.setAttribute(name, value);
} else if (typeof value === 'boolean') {
value ? this.setAttribute(name, value) : this.removeAttribute(name);
} else if(this._connected) {
} else if (this._connected) {
this.attributeChangedCallback(name, oldValue, value);
}
}
Expand Down Expand Up @@ -110,8 +110,8 @@ export default function XCBaseMixin(base) {

Array.prototype.forEach.call(elementChildren, function(child) {
if (child !== this &&
(!child.hasAttribute('aria-hidden')
|| child.getAttribute('aria-hidden') !== 'true')) {
(!child.hasAttribute('aria-hidden') ||
child.getAttribute('aria-hidden') !== 'true')) {
child.setAttribute('aria-hidden', 'true');
hidden.push(child);
}
Expand Down Expand Up @@ -144,7 +144,7 @@ export default function XCBaseMixin(base) {
_onEscape(callback, event) {
var ESCAPE = 27;

if(event.keyCode === ESCAPE) {
if (event.keyCode === ESCAPE) {
callback(event);
event.preventDefault();
}
Expand Down
1 change: 0 additions & 1 deletion elements/xc-header/xc-header.js
Expand Up @@ -340,6 +340,5 @@ export default class XCHeader extends XCBaseMixin(HTMLElement) {
target.scrollIntoView();
target.focus();
}

}
customElements.define(XCHeader.is, XCHeader);