@@ -138,6 +138,7 @@ dynComment t = do
138138display :: (PostBuild t m, DomBuilder t m, Show a) => Dynamic t a -> m ()
139139display = dynText . fmap (T.pack . show)
140140
141+{-# DEPRECATED button "Use 'elAttr'' in combination with 'domEvent' instead" #-}
141142button :: DomBuilder t m => Text -> m (Event t ())
142143button t = do
143144 (e, _) <- element "button" def $ text t
@@ -145,7 +146,9 @@ button t = do
145146
146147--TODO: Should this be renamed to 'widgetView' for consistency with 'widgetHold'?
147148-- | Given a Dynamic of widget-creating actions, create a widget that is recreated whenever the Dynamic updates.
148−-- The returned Event of widget results occurs when the Dynamic does.
149+-- The returned Event occurs whenever the child widget is updated, which is
150+-- at post-build in addition to the times at which the input Dynamic is
151+-- updated, and its value is the result of running the widget.
149152-- Note: Often, the type @a@ is an 'Event', in which case the return value is an Event-of-Events that would typically be flattened (via 'switchHold').
150153dyn :: (Adjustable t m, NotReady t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)
151154dyn = networkView
@@ -269,45 +272,25 @@ dynamicAttributesToModifyAttributesWithInitial attrs0 d = do
269272 return $ if Map.null p then Nothing else Just p
270273 return modificationsNeeded
271274
272−--------------------------------------------------------------------------------
273−-- Copied and pasted from Reflex.Widget.Class
274−--------------------------------------------------------------------------------
275−
276−{-
277−schedulePostBuild x = performEvent_ . (x <$) =<< getPostBuild
278−
279−elDynHtml' :: DomBuilder t m => Text -> Dynamic t Text -> m (El t)
280−elDynHtml' elementTag html = do
281− e <- buildEmptyElement elementTag (Map.empty :: Map Text Text)
282− schedulePostBuild $ setInnerHTML e . Just =<< sample (current html)
283− performEvent_ $ fmap (setInnerHTML e . Just) $ updated html
284− wrapElement defaultDomEventHandler e
285−
286−elDynHtmlAttr' :: DomBuilder t m => Text -> Map Text Text -> Dynamic t Text -> m (El t)
287−elDynHtmlAttr' elementTag attrs html = do
288− e <- buildEmptyElement elementTag attrs
289− schedulePostBuild $ setInnerHTML e . Just =<< sample (current html)
290− performEvent_ $ fmap (setInnerHTML e . Just) $ updated html
291− wrapElement defaultDomEventHandler e
292−-}
293−
275+{-# DEPRECATED Link "Will be removed when 'linkClass' and 'link' are removed. Follow those functions' deprecation instructions." #-}
294276newtype Link t
295277 = Link { _link_clicked :: Event t ()
296278 }
297279
298−-- | >>> linkClass "Click here" "link-class"
299−-- > <a class="link-class">Click here</a>
280+{-# DEPRECATED linkClass "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
300281linkClass :: DomBuilder t m => Text -> Text -> m (Link t)
301282linkClass s c = do
302283 (l,_) <- elAttr' "a" ("class" =: c) $ text s
303284 return $ Link $ domEvent Click l
304285
286+{-# DEPRECATED link "Use 'elAttr'' in combination with 'domEvent' for just clicks. Use 'routeLink' for Obelisk navigation" #-}
305287link :: DomBuilder t m => Text -> m (Link t)
306288link s = linkClass s ""
307289
308290divClass :: forall t m a. DomBuilder t m => Text -> m a -> m a
309291divClass = elClass "div"
310292
293+{-# DEPRECATED dtdd "Use an application specific widget generating function" #-}
311294dtdd :: forall t m a. DomBuilder t m => Text -> m a -> m a
312295dtdd h w = do
313296 el "dt" $ text h
@@ -316,7 +299,9 @@ dtdd h w = do
316299blank :: forall m. Monad m => m ()
317300blank = return ()
318301
302+-- TODO: Move to an example project.
319303-- | A widget to display a table with static columns and dynamic rows.
304+{-# DEPRECATED tableDynAttr "Use an application specific widget generating function" #-}
320305tableDynAttr :: forall t m r k v. (Ord k, DomBuilder t m, MonadHold t m, PostBuild t m, MonadFix m)
321306 => Text -- ^ Class applied to <table> element
322307 -> [(Text, k -> Dynamic t r -> m v)] -- ^ Columns of (header, row key -> row value -> child widget)
@@ -332,9 +317,11 @@ tableDynAttr klass cols dRows rowAttrs = elAttr "div" (Map.singleton "style" "zo
332317 dAttrs <- rowAttrs k
333318 elDynAttr' "tr" dAttrs $ mapM (\x -> el "td" $ snd x k r) cols)
334319
320+-- TODO: Move to an example project.
335321-- | A widget to construct a tabbed view that shows only one of its child widgets at a time.
336322-- Creates a header bar containing a <ul> with one <li> per child; clicking a <li> displays
337323-- the corresponding child and hides all others.
324+{-# DEPRECATED tabDisplay "Use an application specific widget generating function" #-}
338325tabDisplay :: forall t m k. (MonadFix m, DomBuilder t m, MonadHold t m, PostBuild t m, Ord k)
339326 => Text -- ^ Class applied to <ul> element
340327 -> Text -- ^ Class applied to currently active <li> element