Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
minor polyfill compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Aug 4, 2014
1 parent be83c83 commit 512c9ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/declaration/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
ready: function() {
this.flush();
readyPolyfill();
Platform.flush();
requestAnimationFrame(this.flushReadyCallbacks);
},

Expand Down Expand Up @@ -189,7 +190,6 @@
CustomElements.upgradeDocumentTree(document);
CustomElements.ready = true;
}
Platform.flush();
}

function whenPolymerReady(callback) {
Expand Down
11 changes: 10 additions & 1 deletion src/system/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
On supported platforms, platform.js is not needed. To retain compatibility
with the polyfills, we stub out minimal functionality.
*/
if (!window.Platfrom) {
if (!window.Platform) {
logFlags = window.logFlags || {};


Expand All @@ -21,6 +21,7 @@ if (!window.Platfrom) {

CustomElements = {
useNative: true,
ready: true,
takeRecords: function() {},
instanceof: function(obj, base) {
return obj instanceof base;
Expand All @@ -31,6 +32,14 @@ if (!window.Platfrom) {
useNative: true
};


addEventListener('HTMLImportsLoaded', function() {
document.dispatchEvent(
new CustomEvent('WebComponentsReady', {bubbles: true})
);
});


// ShadowDOM
ShadowDOMPolyfill = null;
wrap = unwrap = function(n){
Expand Down

0 comments on commit 512c9ba

Please sign in to comment.