JavaScript in v4.0 - showing error message.

  1. 4 months ago


    I've put some Javascript into my PubCoder doc, into a smart object which has been working in v3.0 and now in the latest version 4.0 it's not working.

    I also tested your 'Hyper-Fishes' in v4.0 and it send out the same code but, in v3.0 it works like how mine does.

    This is my JavaScript (which works in v3.0 not 4.0)
    var hypeDocument = $("#obj5114 iframe")[0].contentWindow.HYPE.documents["Testimonials"];


    hypeDocument.startTimelineNamed('Main Timeline', hypeDocument.kDirectionForward);

    Error message says:
    Script error.
    Line: 0

    Could you please help with this?





  2. Angelo S

    May 27 Administrator

    Hello Ian,
    it will work when exported to HTML or XPUB, it is a problem only in the preview.
    In 4.0, we updated to use a new WebView engine in the stage and preview (WKWebView) which has some security limitations when dealing with iframes and not running on a web server.


or Sign Up to reply!