Access to DOM model

I described JavaScript & XMU files in playlist (and manifest):

<ApplicationResource
loadingBegin="00:00:00:00"
priority="1"
src="
file:///dvddisc/ADV_OBJ/main.js"
multiplexed="false"
/>
<ApplicationResource
loadingBegin="00:00:00:00"
priority="1"
src="
file:///dvddisc/ADV_OBJ/main.xmu"
multiplexed="false"
/>

When iHDSim start to executing JS, he can't access to XMU DOM model from JS file (Example: document.getElementById('Button') return "Unable to evaluate the expression."). After what event can I work with DOM model



Answer this question

Access to DOM model

  • Amadrias

  • Wojtek

    I tried moving my variable declaration inside the setMarkupLoaderHandler and it isn't setting the global variable sceneSliderPosition:


    <snip . . . >

    function OnLoad() {
    var sceneSliderPosition = 1;
    }

    setMarkupLoadedHandler(OnLoad);


    However if I simply declare sceneSliderPosition outside OnLoad then I can use it.



  • DenisCote

    XPath question:

    How can I set the value of an attribute using XPath variable e.g.

    <cue select="bluh" begin="begin_condition" dur="1f">

    <set state:value="$InTheatersMovies" />

    </cue>

    where $InTheatersMovies is an XPath variable whose value is changed in the script at run time.

    Thanks,


  • mkoren

    With the answer being that you must do it from your setMarkupLoadedHandler function ;-)

  • &amp;#35;pragma

    Where in the spec is setMarkupLoadedHandler covered


  • Andres Aguiar

    Please start a new thread when you need to ask a new question. Thanks

  • nsam

    For global script variables, you want to declare them globally. Right now, sceneSliderPosition is local to OnLoad and cannot be used elsewhere.

    This thread was talking about XPath variables that are referenced in the markup file as $variableName. These XPath variables -- set via document.setXPathVariable("name", "value") -- must be done in the onload handler.



  • Access to DOM model