зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797139
- Don't null out l10n from destructor(). r=dholbert,Gijs
destructor() should really clean-up after setup(), not the constructor(), since setup() can be called multiple times. Differential Revision: https://phabricator.services.mozilla.com/D160332
This commit is contained in:
Родитель
eb83c140a5
Коммит
33f548e9da
|
@ -0,0 +1,2 @@
|
|||
<!doctype html>
|
||||
<input type="datetime-local">
|
|
@ -0,0 +1,9 @@
|
|||
<!doctype html>
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1797139">
|
||||
<link rel="match" href="datetime-dynamic-type-change-ref.html">
|
||||
<input type="date">
|
||||
<script>
|
||||
onload = function() {
|
||||
document.querySelector("input").type = "datetime-local";
|
||||
}
|
||||
</script>
|
|
@ -17,7 +17,6 @@ this.DateTimeBoxWidget = class {
|
|||
this.element = shadowRoot.host;
|
||||
this.document = this.element.ownerDocument;
|
||||
this.window = this.document.defaultView;
|
||||
|
||||
// The DOMLocalization instance needs to allow for sync methods so that
|
||||
// the placeholder value may be determined and set during the
|
||||
// createEditFieldAndAppend() call.
|
||||
|
@ -25,7 +24,6 @@ this.DateTimeBoxWidget = class {
|
|||
["toolkit/global/datetimebox.ftl"],
|
||||
/* aSync = */ true
|
||||
);
|
||||
this.l10n.connectRoot(this.shadowRoot);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -77,7 +75,6 @@ this.DateTimeBoxWidget = class {
|
|||
});
|
||||
|
||||
this.l10n.disconnectRoot(this.shadowRoot);
|
||||
this.l10n = null;
|
||||
|
||||
this.removeEditFields();
|
||||
|
||||
|
@ -132,6 +129,8 @@ this.DateTimeBoxWidget = class {
|
|||
setup() {
|
||||
this.DEBUG = false;
|
||||
|
||||
this.l10n.connectRoot(this.shadowRoot);
|
||||
|
||||
this.generateContent();
|
||||
|
||||
this.mDateTimeBoxElement = this.shadowRoot.firstChild;
|
||||
|
|
Загрузка…
Ссылка в новой задаче