Skip to content

Commit

Permalink
Remove importHref from 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed May 9, 2018
1 parent d089bdc commit fd416a2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 120 deletions.
24 changes: 0 additions & 24 deletions lib/legacy/legacy-element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ElementMixin } from '../mixins/element-mixin.js';
import { GestureEventListeners } from '../mixins/gesture-event-listeners.js';
import { DirMixin } from '../mixins/dir-mixin.js';
import { dedupingMixin } from '../utils/mixin.js';
import { importHref as importHref$0 } from '../utils/import-href.js';
import '../utils/render-status.js';
import '../utils/unresolved.js';
import { dom as dom$0, matchesSelector } from './polymer.dom.js';
Expand Down Expand Up @@ -798,29 +797,6 @@ export const LegacyElementMixin = dedupingMixin((base) => {
return elt;
}

/**
* Convenience method for importing an HTML document imperatively.
*
* This method creates a new `<link rel="import">` element with
* the provided URL and appends it to the document to start loading.
* In the `onload` callback, the `import` property of the `link`
* element will contain the imported document contents.
*
* @param {string} href URL to document to load.
* @param {?function(!Event):void=} onload Callback to notify when an import successfully
* loaded.
* @param {?function(!ErrorEvent):void=} onerror Callback to notify when an import
* unsuccessfully loaded.
* @param {boolean=} optAsync True if the import should be loaded `async`.
* Defaults to `false`.
* @return {!HTMLLinkElement} The link element for the URL to be loaded.
*/
importHref(href, onload, onerror, optAsync) { // eslint-disable-line no-unused-vars
let loadFn = onload ? onload.bind(this) : null;
let errorFn = onerror ? onerror.bind(this) : null;
return importHref$0(href, loadFn, errorFn, optAsync);
}

/**
* Polyfill for Element.prototype.matches, which is sometimes still
* prefixed.
Expand Down
96 changes: 0 additions & 96 deletions lib/utils/import-href.js

This file was deleted.

6 comments on commit fd416a2

@ztzven
Copy link

@ztzven ztzven commented on fd416a2 Jun 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

@mohammed-softordi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? How should we import html elements?

@moderndeveloperllc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ztzven @mohammed-softordi Polymer 3 uses ES6 module imports rather than HTML imports now. You may need to read up on all the changes Polymer 3 brings about as they are quite extensive.

@web-padawan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 this should have been done in 3.0.0 release, not in 3.0.2 though

@mohammed-softordi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moderndeveloperllc thanks for explaining. I know that polymer 3 uses ES6 module imports. The problem is that not all custom elements uses ES6 module import and we still need to load them. But I guess we have to convert elements using Polymer modulizer

@davidmaxwaterman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be confirmed, since it implies that an upgrade needs to be done all-at-once. It would be much better if upgrading could be done in stages - or, indeed, not at all, in the case of using third party elements.

Please sign in to comment.