package js_of_ocaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Js_of_ocaml.Dom_svgSource

DOM SVG binding

This is a partial binding to the DOM SVG API.

Types

Sourcetype error_code =
  1. | WRONG_TYPE_ERR
  2. | INVALID_VALUE_ERR
  3. | MATRIX_NOT_INVERTABLE
Sourceclass type svg_error = object ... end
Sourceexception SVGError of svg_error
Sourcetype 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
Sourcetype angleUnitType =
  1. | ANGLETYPE_UNKNOWN
  2. | ANGLETYPE_UNSPECIFIED
  3. | ANGLETYPE_DEG
  4. | ANGLETYPE_RAD
  5. | ANGLETYPE_GRAD
Sourcetype colorType =
  1. | COLORTYPE_UNKNOWN
  2. | COLORTYPE_RGBCOLOR
  3. | COLORTYPE_RGBCOLOR_ICCCOLOR
  4. | COLORTYPE_CURRENTCOLOR
Sourcetype 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
Sourcetype meetOrSliceType =
  1. | MEETORSLICE_UNKNOWN
  2. | MEETORSLICE_MEET
  3. | MEETORSLICE_SLICE
Sourcetype transformType =
  1. | TRANSFORM_UNKNOWN
  2. | TRANSFORM_MATRIX
  3. | TRANSFORM_TRANSLATE
  4. | TRANSFORM_SCALE
  5. | TRANSFORM_ROTATE
  6. | TRANSFORM_SKEWX
  7. | TRANSFORM_SKEWY
Sourcetype zoomAndPanType =
  1. | ZOOMANDPAN_UNKNOWN
  2. | ZOOMANDPAN_DISABLE
  3. | ZOOMANDPAN_MAGNIFY
Sourcetype lengthAdjust =
  1. | LENGTHADJUST_UNKNOWN
  2. | LENGTHADJUST_SPACING
  3. | LENGTHADJUST_SPACINGANDGLYPHS
Sourcetype unitType =
  1. | UNIT_TYPE_UNKNOWN
  2. | UNIT_TYPE_USERSPACEONUSE
  3. | UNIT_TYPE_OBJECTBOUNDINGBOX
Sourcetype 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
Sourcetype 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
Sourcetype textPathMethodType =
  1. | TEXTPATH_METHODTYPE_UNKNOWN
  2. | TEXTPATH_METHODTYPE_ALIGN
  3. | TEXTPATH_METHODTYPE_STRETCH
Sourcetype textPathSpacingType =
  1. | TEXTPATH_SPACINGTYPE_UNKNOWN
  2. | TEXTPATH_SPACINGTYPE_AUTO
  3. | TEXTPATH_SPACINGTYPE_EXACT
Sourcetype spreadMethodType =
  1. | SPREADMETHOD_UNKNOWN
  2. | SPREADMETHOD_PAD
  3. | SPREADMETHOD_REFLECT
  4. | SPREADMETHOD_REPEAT
Sourcetype suspendHandleID
Sourceclass type 'a animated = object ... end
Sourceclass type 'a list = object ... end

Elements

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

Helper functions for creating Svg elements

Sourceval createElement : document Js.t -> string -> element Js.t
Sourceval createA : document Js.t -> aElement Js.t
Sourceval createAltGlyph : document Js.t -> altGlyphElement Js.t
Sourceval createAltGlyphDef : document Js.t -> altGlyphDefElement Js.t
Sourceval createAltGlyphItem : document Js.t -> altGlyphItemElement Js.t
Sourceval createAnimate : document Js.t -> animateElement Js.t
Sourceval createAnimateColor : document Js.t -> animateColorElement Js.t
Sourceval createAnimateMotion : document Js.t -> animateMotionElement Js.t
Sourceval createAnimateTransform : document Js.t -> animateTransformElement Js.t
Sourceval createCircle : document Js.t -> circleElement Js.t
Sourceval createClipPath : document Js.t -> clipPathElement Js.t
Sourceval createCursor : document Js.t -> cursorElement Js.t
Sourceval createDefs : document Js.t -> defsElement Js.t
Sourceval createDesc : document Js.t -> descElement Js.t
Sourceval createEllipse : document Js.t -> ellipseElement Js.t
Sourceval createFilter : document Js.t -> filterElement Js.t
Sourceval createFont : document Js.t -> fontElement Js.t
Sourceval createFontFace : document Js.t -> fontElement Js.t
Sourceval createFontFaceFormat : document Js.t -> fontElement Js.t
Sourceval createFontFaceName : document Js.t -> fontElement Js.t
Sourceval createFontFaceSrc : document Js.t -> fontElement Js.t
Sourceval createFontFaceUri : document Js.t -> fontElement Js.t
Sourceval createForeignObject : document Js.t -> foreignObjectElement Js.t
Sourceval createG : document Js.t -> gElement Js.t
Sourceval createGlyph : document Js.t -> glyphElement Js.t
Sourceval createGlyphRef : document Js.t -> glyphElement Js.t
Sourceval createhkern : document Js.t -> element Js.t
Sourceval createImage : document Js.t -> imageElement Js.t
Sourceval createLineElement : document Js.t -> lineElement Js.t
Sourceval createLinearElement : document Js.t -> linearGradientElement Js.t
Sourceval createMask : document Js.t -> maskElement Js.t
Sourceval createMetaData : document Js.t -> metadataElement Js.t
Sourceval createMissingGlyph : document Js.t -> glyphElement Js.t
Sourceval createMPath : document Js.t -> mPathElement Js.t
Sourceval createPath : document Js.t -> pathElement Js.t
Sourceval createPattern : document Js.t -> patternElement Js.t
Sourceval createPolygon : document Js.t -> polygonElement Js.t
Sourceval createPolyline : document Js.t -> polyLineElement Js.t
Sourceval createRadialgradient : document Js.t -> radialGradientElement Js.t
Sourceval createRect : document Js.t -> rectElement Js.t
Sourceval createScript : document Js.t -> scriptElement Js.t
Sourceval createSet : document Js.t -> setElement Js.t
Sourceval createStop : document Js.t -> stopElement Js.t
Sourceval createStyle : document Js.t -> styleElement Js.t
Sourceval createSvg : document Js.t -> svgElement Js.t
Sourceval createSwitch : document Js.t -> switchElement Js.t
Sourceval createSymbol : document Js.t -> symbolElement Js.t
Sourceval createTextElement : document Js.t -> textElement Js.t
Sourceval createTextpath : document Js.t -> textPathElement Js.t
Sourceval createTitle : document Js.t -> titleElement Js.t
Sourceval createTref : document Js.t -> trefElement Js.t
Sourceval createTspan : document Js.t -> tspanElement Js.t
Sourceval createUse : document Js.t -> useElement Js.t
Sourceval createView : document Js.t -> viewElement Js.t
Sourceval createvkern : document Js.t -> element Js.t
Sourceval svg_element : element Js.t Js.constr
Sourceval document : document Js.t

The current document

Sourceval getElementById : string -> element 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

Sourcemodule CoerceTo : sig ... end
OCaml

Innovation. Community. Security.