From 7cb64b5e93279b9c654d2cb035f895e59adbddda Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Fri, 1 Mar 2019 15:55:43 +0100 Subject: [REF] doc: promisify doc examples Also remove a file on async stuff as its content is outdated, and actually not used. --- doc/reference/javascript_reference.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/reference/javascript_reference.rst') diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst index 059b5796041..02c477905d5 100644 --- a/doc/reference/javascript_reference.rst +++ b/doc/reference/javascript_reference.rst @@ -879,7 +879,7 @@ Here is an example on how this event system could be used: this.counter = new Counter(this); this.counter.on('valuechange', this, this._onValueChange); var def = this.counter.appendTo(this.$el); - return $.when(def, this._super.apply(this, arguments); + return Promise.all([def, this._super.apply(this, arguments)]); }, _onValueChange: function (val) { // do something with val @@ -1500,15 +1500,15 @@ order. - type: setting the input type (*text* by default, can be set on *number*) - On edit mode, the field is rendered as an input with the HTML attribute type - setted on *number* (so user can benefit the native support, especially on + On edit mode, the field is rendered as an input with the HTML attribute type + setted on *number* (so user can benefit the native support, especially on mobile). In this case, the default formatting is disabled to avoid incompability. .. code-block:: xml - - step: set the step to the value up and down when the user click on buttons + - step: set the step to the value up and down when the user click on buttons (only for input of type number, 1 by default) .. code-block:: xml @@ -1532,15 +1532,15 @@ order. - type: setting the input type (*text* by default, can be set on *number*) - On edit mode, the field is rendered as an input with the HTML attribute type - setted on *number* (so user can benefit the native support, especially on + On edit mode, the field is rendered as an input with the HTML attribute type + setted on *number* (so user can benefit the native support, especially on mobile). In this case, the default formatting is disabled to avoid incompability. .. code-block:: xml - - step: set the step to the value up and down when the user click on buttons + - step: set the step to the value up and down when the user click on buttons (only for input of type number, 1 by default) .. code-block:: xml -- cgit v1.2.3