projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45df6dd
)
When div is of type string, replace it with a document element.
author
Robert Konigsberg
<konigsberg@google.com>
Thu, 22 Nov 2012 17:55:03 +0000
(12:55 -0500)
committer
Robert Konigsberg
<konigsberg@google.com>
Thu, 22 Nov 2012 17:55:03 +0000
(12:55 -0500)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
c7f7087
..
42e87c8
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-355,6
+355,10
@@
Dygraph.prototype.__init__ = function(div, file, attrs) {
attrs = Dygraph.mapLegacyOptions_(attrs);
+ if (typeof(div) == 'string') {
+ div = document.getElementById(div);
+ }
+
if (!div) {
Dygraph.error("Constructing dygraph with a non-existent div!");
return;