首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Webkit导入documentCreateElement函数

从Webkit导入documentCreateElement函数
EN

Stack Overflow用户
提问于 2016-08-19 00:30:54
回答 1查看 84关注 0票数 1

我正在尝试导入在Reflex FRP中使用的documentGetElementById函数。我尝试了下面的导入,但找不到函数(根据hackage应该在那里):

代码语言:javascript
复制
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( Test.hs, interpreted )
Ok, modules loaded: Main.
*Main> import Graphics.UI.Gtk.WebKit.DOM.Document
*Main Graphics.UI.Gtk.WebKit.DOM.Document> :t documentGetElementById
<interactive>:1:1: error:
   Variable not in scope: documentGetElementById

我将非常感谢你能帮助我解决这个问题。我在ghc 8.0.1上运行最新的Reflex平台构建,webkit现在可以在mac上运行。我在Linux上也看到了同样的问题。因此,它似乎不是特定于平台的。

我也在ghcjs-dom上做了github code search,但是documentGetElementById没有出现。所以,也许它已经被转移到其他地方了?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-23 21:32:48

经过ghcjs-dom重构后,documentGetElementById已重命名为getElementById。因此,如下所示的导入将会起作用:

代码语言:javascript
复制
*Main> import Graphics.UI.Gtk.WebKit.DOM.Document
*Main Graphics.UI.Gtk.WebKit.DOM.Document> :t getElementById 
getElementById
  :: (DocumentClass self, System.Glib.UTFString.GlibString string,
      MonadIO m) =>
     self -> string -> m (Maybe Graphics.UI.Gtk.WebKit.Types.Element)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39023287

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档