package js_of_ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
  • deprecated Will be removed past 2019-01-01. Use Js_of_ocaml.Dom_svg instead.
type error_code =
  1. | WRONG_TYPE_ERR
  2. | INVALID_VALUE_ERR
  3. | MATRIX_NOT_INVERTABLE
class type svg_error = object ... end
exception SVGError of svg_error
type lengthUnitType =
  1. | LENGTHTYPE_UNKNOWN
  2. | LENGTHTYPE_NUMBER
  3. | LENGTHTYPE_PERCENTAGE
  4. | LENGTHTYPE_EMS
  5. | LENGTHTYPE_EXS
  6. | LENGTHTYPE_PX
  7. | LENGTHTYPE_CM
  8. | LENGTHTYPE_MM
  9. | LENGTHTYPE_IN
  10. | LENGTHTYPE_PT
  11. | LENGTHTYPE_PC
type angleUnitType =
  1. | ANGLETYPE_UNKNOWN
  2. | ANGLETYPE_UNSPECIFIED
  3. | ANGLETYPE_DEG
  4. | ANGLETYPE_RAD
  5. | ANGLETYPE_GRAD
type colorType =
  1. | COLORTYPE_UNKNOWN
  2. | COLORTYPE_RGBCOLOR
  3. | COLORTYPE_RGBCOLOR_ICCCOLOR
  4. | COLORTYPE_CURRENTCOLOR
type alignmentType =
  1. | PRESERVEASPECTRATIO_UNKNOWN
  2. | PRESERVEASPECTRATIO_NONE
  3. | PRESERVEASPECTRATIO_XMINYMIN
  4. | PRESERVEASPECTRATIO_XMIDYMIN
  5. | PRESERVEASPECTRATIO_XMAXYMIN
  6. | PRESERVEASPECTRATIO_XMINYMID
  7. | PRESERVEASPECTRATIO_XMIDYMID
  8. | PRESERVEASPECTRATIO_XMAXYMID
  9. | PRESERVEASPECTRATIO_XMINYMAX
  10. | PRESERVEASPECTRATIO_XMIDYMAX
  11. | PRESERVEASPECTRATIO_XMAXYMAX
type meetOrSliceType =
  1. | MEETORSLICE_UNKNOWN
  2. | MEETORSLICE_MEET
  3. | MEETORSLICE_SLICE
type transformType =
  1. | TRANSFORM_UNKNOWN
  2. | TRANSFORM_MATRIX
  3. | TRANSFORM_TRANSLATE
  4. | TRANSFORM_SCALE
  5. | TRANSFORM_ROTATE
  6. | TRANSFORM_SKEWX
  7. | TRANSFORM_SKEWY
type zoomAndPanType =
  1. | ZOOMANDPAN_UNKNOWN
  2. | ZOOMANDPAN_DISABLE
  3. | ZOOMANDPAN_MAGNIFY
type lengthAdjust =
  1. | LENGTHADJUST_UNKNOWN
  2. | LENGTHADJUST_SPACING
  3. | LENGTHADJUST_SPACINGANDGLYPHS
type unitType =
  1. | UNIT_TYPE_UNKNOWN
  2. | UNIT_TYPE_USERSPACEONUSE
  3. | UNIT_TYPE_OBJECTBOUNDINGBOX
type intentType =
  1. | RENDERING_INTENT_UNKNOWN
  2. | RENDERING_INTENT_AUTO
  3. | RENDERING_INTENT_PERCEPTUAL
  4. | RENDERING_INTENT_RELATIVE_COLORIMETRIC
  5. | RENDERING_INTENT_SATURATION
  6. | RENDERING_INTENT_ABSOLUTE_COLORIMETRIC
type pathSegmentType =
  1. | PATHSEG_UNKNOWN
  2. | PATHSEG_CLOSEPATH
  3. | PATHSEG_MOVETO_ABS
  4. | PATHSEG_MOVETO_REL
  5. | PATHSEG_LINETO_ABS
  6. | PATHSEG_LINETO_REL
  7. | PATHSEG_CURVETO_CUBIC_ABS
  8. | PATHSEG_CURVETO_CUBIC_REL
  9. | PATHSEG_CURVETO_QUADRATIC_ABS
  10. | PATHSEG_CURVETO_QUADRATIC_REL
  11. | PATHSEG_ARC_ABS
  12. | PATHSEG_ARC_REL
  13. | PATHSEG_LINETO_HORIZONTAL_ABS
  14. | PATHSEG_LINETO_HORIZONTAL_REL
  15. | PATHSEG_LINETO_VERTICAL_ABS
  16. | PATHSEG_LINETO_VERTICAL_REL
  17. | PATHSEG_CURVETO_CUBIC_SMOOTH_ABS
  18. | PATHSEG_CURVETO_CUBIC_SMOOTH_REL
  19. | PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS
  20. | PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL
type textPathMethodType =
  1. | TEXTPATH_METHODTYPE_UNKNOWN
  2. | TEXTPATH_METHODTYPE_ALIGN
  3. | TEXTPATH_METHODTYPE_STRETCH
type textPathSpacingType =
  1. | TEXTPATH_SPACINGTYPE_UNKNOWN
  2. | TEXTPATH_SPACINGTYPE_AUTO
  3. | TEXTPATH_SPACINGTYPE_EXACT
type spreadMethodType =
  1. | SPREADMETHOD_UNKNOWN
  2. | SPREADMETHOD_PAD
  3. | SPREADMETHOD_REFLECT
  4. | SPREADMETHOD_REPEAT
type suspendHandleID
class type 'a animated = object ... end
class type 'a list = object ... end

Elements

class type element = object ... end
class type animatedEnumeration = int animated
class type animatedInteger = int animated
class type animatedNumber = float animated
class type length = object ... end
class type angle = object ... end
class type rgbColor = object ... end
class type color = object ... end
class type iccColor = object ... end
class type rect = object ... end
class type stylable = object ... end
class type locatable = object ... end
class type transformable = object ... end
class type tests = object ... end
class type langSpace = object ... end
class type externalResourcesRequired = object ... end
class type fitToViewBox = object ... end
class type zoomAndPan = object ... end
class type viewSpec = object ... end
class type uriReference = object ... end
class type document = object ... end
class type svgElement = object ... end
class type gElement = object ... end
class type defsElement = object ... end
class type descElement = object ... end
class type titleElement = object ... end
class type symbolElement = object ... end
class type useElement = object ... end
class type elementInstance = object ... end
class type elementInstanceList = object ... end
class type imageElement = object ... end
class type switchElement = object ... end
class type styleElement = object ... end
class type point = object ... end
class type matrix = object ... end
class type transform = object ... end
class type transformList = object ... end
class type preserveAspectRatio = object ... end
class type pathSeg = object ... end
class type pathSegMoveto = object ... end
class type pathSegLineto = object ... end
class type pathSegCurvetoCubic = object ... end
class type pathSegCurvetoQuadratic = object ... end
class type pathSegArc = object ... end
class type pathSegLinetoHorizontal = object ... end
class type pathSegLinetoVertical = object ... end
class type pathSegCurvetoCubicSmooth = object ... end
class type pathSegCurvetoQuadraticSmooth = object ... end
class type animatedPathData = object ... end
class type pathElement = object ... end
class type rectElement = object ... end
class type circleElement = object ... end
class type ellipseElement = object ... end
class type lineElement = object ... end
class type animatedPoints = object ... end
class type polyLineElement = object ... end
class type polygonElement = object ... end
class type textContentElement = object ... end
class type textPositioningElement = object ... end
class type textElement = object ... end
class type trefElement = object ... end
class type textPathElement = object ... end
class type altGlyphElement = object ... end
class type glyphRefElement = object ... end
class type gradientElement = object ... end
class type linearGradientElement = object ... end
class type radialGradientElement = object ... end
class type stopElement = object ... end
class type patternElement = object ... end
class type clipPathElement = object ... end
class type maskElement = object ... end
class type filterElement = object ... end
class type cursorElement = object ... end
class type aElement = object ... end
class type viewElement = object ... end
class type scriptElement = object ... end
class type animationElement = object ... end
class type animateElement = object ... end
class type mPathElement = object ... end
class type animateColorElement = object ... end
class type fontElement = object ... end
class type glyphElement = object ... end
class type foreignObjectElement = object ... end

Helper functions for creating Svg elements

val createElement : document Js_of_ocaml.Js.t -> string -> element Js_of_ocaml.Js.t
val document : document Js_of_ocaml.Js.t

The current document

val getElementById : string -> element Js_of_ocaml.Js.t

getElementById id returns the element with the id id in the current document. It raises Not_found if there are no such element

module CoerceTo : sig ... end
OCaml

Innovation. Community. Security.