i18n-number
Advanced tools
Comparing version 3.0.0-pre.9 to 3.0.0
@@ -25,22 +25,6 @@ /** | ||
*/ | ||
/* | ||
FIXME(polymer-modulizer): the above comments were extracted | ||
from HTML and may be out of place here. Review them and | ||
then delete this comment! | ||
*/ | ||
import { Polymer } from '@polymer/polymer/polymer-legacy.js'; | ||
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { dom } from '@polymer/polymer/lib/legacy/polymer.dom.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
const $_documentContainer = document.createElement('template'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
$_documentContainer.innerHTML = `<dom-module id="i18n-number"> | ||
<template strip-whitespace=""> | ||
<span id="number"></span> | ||
</template> | ||
</dom-module>`; | ||
document.head.appendChild($_documentContainer.content); | ||
var intlLibraryScript; | ||
@@ -55,3 +39,3 @@ var intlLibraryLoadingStatus = 'initializing'; | ||
// Polyfill Intl if required | ||
var intlLibraryUrl = this.resolveUrl('../intl/dist/Intl.min.js'); | ||
var intlLibraryUrl = this.resolveUrl('../intl/dist/Intl.min.js', this.importMeta.url); | ||
if (window.Intl) { | ||
@@ -127,3 +111,3 @@ if (window.IntlPolyfill && window.Intl === window.IntlPolyfill) { | ||
script.setAttribute('id', 'intl-js-locale-' + locale); | ||
script.setAttribute('src', this.resolveUrl('../intl/locale-data/jsonp/' + locale + '.js')); | ||
script.setAttribute('src', this.resolveUrl('../intl/locale-data/jsonp/' + locale + '.js', this.importMeta.url)); | ||
var intlLocaleLoadedBindThis = function (e) { | ||
@@ -349,2 +333,3 @@ if (e.target === script) { | ||
is: 'i18n-number', | ||
_template: (t => { t.setAttribute('strip-whitespace', ''); return t; })(html`<span id="number"></span>`), | ||
@@ -440,6 +425,3 @@ /** | ||
registered: function () { | ||
if (!_setupIntlPolyfillCalled && | ||
// Fix #6: Safari 9 with 2.0-preview cannot properly resolve self URL at registered callback | ||
this.resolveUrl('.').match(/\/i18n-number\//) && | ||
!this.resolveUrl('..').match(/\/i18n-number\//)) { | ||
if (!_setupIntlPolyfillCalled) { | ||
_setupIntlPolyfillCalled = true; | ||
@@ -451,6 +433,2 @@ _setupIntlPolyfill.call(this); | ||
ready: function () { | ||
if (!_setupIntlPolyfillCalled) { // Fix #6: For Safari 9 | ||
_setupIntlPolyfillCalled = true; | ||
_setupIntlPolyfill.call(this); | ||
} | ||
this._setupObservers(); | ||
@@ -457,0 +435,0 @@ this.raw = this.textNode.data; |
@@ -18,3 +18,3 @@ { | ||
"name": "i18n-number", | ||
"version": "3.0.0-pre.9", | ||
"version": "3.0.0", | ||
"main": "i18n-number.js", | ||
@@ -21,0 +21,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
269017
5601