Skip to content

Commit

Permalink
compromise with typescript and closure
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Dec 17, 2018
1 parent e4b56e4 commit e73285b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/legacy/polymer.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const matchesSelector = function(node, selector) {
* @implements {PolymerDomApi}
* @unrestricted
*/
class DomApi {
let DomApi = class {

/**
* @param {Node} node Node for which to create a Polymer.dom helper object.
Expand Down Expand Up @@ -378,7 +378,7 @@ DomApi.prototype.textContent;
/** @type {string} */
DomApi.prototype.innerHTML;

let DomApiImpl = DomApi;
export {DomApi};

if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noPatch'] && window['ShadyDOM']['Wrapper']) {

Expand All @@ -395,7 +395,7 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP
}
});

DomApiImpl = Wrapper;
DomApi = Wrapper;

Object.defineProperties(EventApi.prototype, {

Expand Down Expand Up @@ -434,8 +434,6 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP
]);
}

export {DomApiImpl as DomApi};

/**
* Legacy DOM and Event manipulation API wrapper factory used to abstract
* differences between native Shadow DOM and "Shady DOM" when polyfilling on
Expand All @@ -452,7 +450,7 @@ export {DomApiImpl as DomApi};
*/
export const dom = function(obj) {
obj = obj || document;
if (obj instanceof DomApiImpl) {
if (obj instanceof DomApi) {
return /** @type {!DomApi} */(obj);
}
if (obj instanceof EventApi) {
Expand Down

0 comments on commit e73285b

Please sign in to comment.