Skip to content

Commit

Permalink
Merge pull request Mikhus#60 from Mikhus/v2.0.3
Browse files Browse the repository at this point in the history
V2.0.3
  • Loading branch information
Mikhus authored Sep 23, 2016
2 parents ba3589e + c85085e commit 95fc60c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gauge.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gauge.min.js.map

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions lib/DomObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ export default class DomObserver {
*/
this.Type = ns[type];

/* istanbul ignore next: this should be tested with end-to-end tests */
DomObserver.domReady(this.traverse.bind(this));

/**
* Signals if mutations observer for this type or not
*
Expand All @@ -112,6 +109,9 @@ export default class DomObserver {
* @type {boolean}
*/
this.isObservable = !!ns.MutationObserver;

/* istanbul ignore next: this should be tested with end-to-end tests */
DomObserver.domReady(this.traverse.bind(this));
}

/**
Expand Down Expand Up @@ -328,6 +328,9 @@ export default class DomObserver {
* @param {Function} handler
*/
static domReady(handler) {
if (/comp|inter|loaded/.test((ns.document || {}).readyState + ''))
return handler();

if (ns.addEventListener)
ns.addEventListener('DOMContentLoaded', handler, false);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-gauges",
"version": "2.0.2",
"version": "2.0.3",
"description": "Minimalistic HTML5 Canvas Gauges",
"main": "gauge.min.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion test-coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 95fc60c

Please sign in to comment.