Commit f4c39bc7 authored by Yuanle Song's avatar Yuanle Song
Browse files

bugfix: ** is not supported in firefox

use Math.pow() instead.
parent fc1fc292
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -366,7 +366,7 @@ var fsm = function () {
			    this.snapshots.pop();
			    this.snapshots.pop();
			    return;
			    return;
			}
			}
			r = num ** 0.5;
			r = Math.pow(num, 0.5);
		    	this.numberStack.push(r);
		    	this.numberStack.push(r);
			debug("trail push " + [keyName, shortKeyName(keyName), r]);
			debug("trail push " + [keyName, shortKeyName(keyName), r]);
			this.trail.push([shortKeyName(keyName), r]);
			this.trail.push([shortKeyName(keyName), r]);
@@ -398,7 +398,7 @@ var fsm = function () {
			}
			}
		    	break;
		    	break;
		    case keyNames.power:
		    case keyNames.power:
			if (! this.doBinaryOperator(keyName, (lhs, rhs) => lhs ** rhs)) {
			if (! this.doBinaryOperator(keyName, (lhs, rhs) => Math.pow(lhs, rhs))) {
			    return;
			    return;
			}
			}
		    	break;
		    	break;
+3 −0
Original line number Original line Diff line number Diff line
@@ -82,6 +82,9 @@ doesn't work with <td> in firefox.


** 2017-01-26 make it work offline, add sw.js
** 2017-01-26 make it work offline, add sw.js
* done                                                                :entry:
* done                                                                :entry:
** 2017-01-27 bug: ** is not supported in firefox.
use Math.pow() instead.

** 2017-01-27 accept keyboard event as well.		     :low:featurereq:
** 2017-01-27 accept keyboard event as well.		     :low:featurereq:
- num0 to num9
- num0 to num9
- dot
- dot