Skip to content
Browse files

[fix] use get_attribute instead of get_property (needs opa v991)

  • Loading branch information...
1 parent 805a744 commit 05393a0e6cd3de0ba5b72c4e549cbeec6f63c227 @Aqua-Ye Aqua-Ye committed Nov 25, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 Makefile
  2. +1 −1 src/position.opa
View
1 Makefile
@@ -1,5 +1,6 @@
OPA=opa
EXE=chess.exe
+FLAGS = --minimal-version 991
all: $(EXE)
View
2 src/position.opa
@@ -15,7 +15,7 @@ Position = {{
chess_position_from_dom(dom: dom, board): chess_position =
(
// Very hacky. The 7th and 8th chars are the colulm and row number.
- clz = Dom.get_property(dom,"class") |> Option.get(_)
+ clz = Dom.get_attribute(dom,"class") |> Option.get(_)
column = String.get(6, clz)
row = String.get(7, clz) |> String.to_int(_)
Map.get(column, board.chess_positions) |> Option.get(_) |> Map.get(row, _) |> Option.get(_)

0 comments on commit 05393a0

Please sign in to comment.
Something went wrong with that request. Please try again.