<iframe not working in Edge, but works in Internet Explorer 11Remove border from IFrameHow to apply CSS to iframe?Invoking JavaScript code in an iframe from the parent pagejQuery/JavaScript: accessing contents of an iframelocation.hash inside iframe not working on FirefoxRemove vertical scroll bar from IFrame that gets rendered in Internet ExplorerSaving the content of an iFrame in MS EdgeEdge Browser - iframe.document.open not workingDisplaying Blob PDF in Edge/IE11Javascript inside iframe not working in Internet Explorer

Examples of fluid (including air) being used to transmit digital data?

Do I need transit visa for Dublin?

How to get the speed of my spaceship?

How do resistors generate different heat if we make the current fixed and changed the voltage and resistance? Notice the flow of charge is constant

Bringing coumarin-containing liquor into the USA

Are "confidant" and "confident" homophones?

Gory anime with pink haired girl escaping an asylum

PhD: When to quit and move on?

Do intermediate subdomains need to exist?

Can a USB hub be used to access a drive from two devices?

As a supervisor, what feedback would you expect from a PhD who quits?

Possibility to correct pitch from digital versions of records with the hole not centered

Computer name naming convention for security

My professor has told me he will be the corresponding author. Will it hurt my future career?

How to delete multiple process id of a single process?

Better random (unique) file name

Do Goblin tokens count as Goblins?

How do I explain how I handle unrealistic expectations from superiors in an interview?

Wouldn't putting an electronic key inside a small Faraday cage render it completely useless?

What is the highest level of accuracy in motion control a Victorian society could achieve?

Park the computer

Why do most airliners have underwing engines, while business jets have rear-mounted engines?

Shipped package arrived - didn't order, possible scam?

Did Stalin kill all Soviet officers involved in the Winter War?



Remove border from IFrameHow to apply CSS to iframe?Invoking JavaScript code in an iframe from the parent pagejQuery/JavaScript: accessing contents of an iframelocation.hash inside iframe not working on FirefoxRemove vertical scroll bar from IFrame that gets rendered in Internet ExplorerSaving the content of an iFrame in MS EdgeEdge Browser - iframe.document.open not workingDisplaying Blob PDF in Edge/IE11Javascript inside iframe not working in Internet Explorer






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a basic iframe embedding HTML content. I applied a workaround to get it to work in IE11, but doesn't work in Edge. Works great in Chrome and FireFox. Half of my users are on Edge...



<iframe
title="My iframe should work"
class="large"
id="my-slide-should-work"
src="javascript: window.frameElement.getAttribute('srcdoc');" // this fixed it for IE11
scrolling="no"
srcdoc='<!DOCTYPE html><html>all the goodness</html>'>
</iframe>


Edge just shows a blank space, errors out about the JS



SCRIPT5007: SCRIPT5007: Unable to get property 'getAttribute' of undefined or null reference
javascript: window.frameElement.getAttribute('srcdoc'); (1,2)









share|improve this question




























    0















    I have a basic iframe embedding HTML content. I applied a workaround to get it to work in IE11, but doesn't work in Edge. Works great in Chrome and FireFox. Half of my users are on Edge...



    <iframe
    title="My iframe should work"
    class="large"
    id="my-slide-should-work"
    src="javascript: window.frameElement.getAttribute('srcdoc');" // this fixed it for IE11
    scrolling="no"
    srcdoc='<!DOCTYPE html><html>all the goodness</html>'>
    </iframe>


    Edge just shows a blank space, errors out about the JS



    SCRIPT5007: SCRIPT5007: Unable to get property 'getAttribute' of undefined or null reference
    javascript: window.frameElement.getAttribute('srcdoc'); (1,2)









    share|improve this question
























      0












      0








      0








      I have a basic iframe embedding HTML content. I applied a workaround to get it to work in IE11, but doesn't work in Edge. Works great in Chrome and FireFox. Half of my users are on Edge...



      <iframe
      title="My iframe should work"
      class="large"
      id="my-slide-should-work"
      src="javascript: window.frameElement.getAttribute('srcdoc');" // this fixed it for IE11
      scrolling="no"
      srcdoc='<!DOCTYPE html><html>all the goodness</html>'>
      </iframe>


      Edge just shows a blank space, errors out about the JS



      SCRIPT5007: SCRIPT5007: Unable to get property 'getAttribute' of undefined or null reference
      javascript: window.frameElement.getAttribute('srcdoc'); (1,2)









      share|improve this question














      I have a basic iframe embedding HTML content. I applied a workaround to get it to work in IE11, but doesn't work in Edge. Works great in Chrome and FireFox. Half of my users are on Edge...



      <iframe
      title="My iframe should work"
      class="large"
      id="my-slide-should-work"
      src="javascript: window.frameElement.getAttribute('srcdoc');" // this fixed it for IE11
      scrolling="no"
      srcdoc='<!DOCTYPE html><html>all the goodness</html>'>
      </iframe>


      Edge just shows a blank space, errors out about the JS



      SCRIPT5007: SCRIPT5007: Unable to get property 'getAttribute' of undefined or null reference
      javascript: window.frameElement.getAttribute('srcdoc'); (1,2)






      iframe microsoft-edge






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 20:22









      David LozziDavid Lozzi

      2,7676 gold badges19 silver badges27 bronze badges




      2,7676 gold badges19 silver badges27 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Looks like window.frameElement is NULL and because of that it is not able to get 'srcdoc' using getAttribute.



          Below can be the possible reason why it is Null.




          If the window isn't embedded into another document, or if the document
          into which it's embedded has a different origin (such as having been
          located from a different domain), this is null.




          So you can try to check for the above mentioned criteria and I suggest you to create a script segment and try to check whether window.frameElement is Null or not. If it is not null than try use GetAttribute before assign its value to IFrame src.



          Another thing you need to notice that srcdoc attribute is not supported in MS Edge. So MS Edge will not have any effect of that attribute.



          References:



          (1) Window.frameElement



          (2) <'iframe'>: The Inline Frame element






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345838%2fiframe-not-working-in-edge-but-works-in-internet-explorer-11%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Looks like window.frameElement is NULL and because of that it is not able to get 'srcdoc' using getAttribute.



            Below can be the possible reason why it is Null.




            If the window isn't embedded into another document, or if the document
            into which it's embedded has a different origin (such as having been
            located from a different domain), this is null.




            So you can try to check for the above mentioned criteria and I suggest you to create a script segment and try to check whether window.frameElement is Null or not. If it is not null than try use GetAttribute before assign its value to IFrame src.



            Another thing you need to notice that srcdoc attribute is not supported in MS Edge. So MS Edge will not have any effect of that attribute.



            References:



            (1) Window.frameElement



            (2) <'iframe'>: The Inline Frame element






            share|improve this answer



























              0














              Looks like window.frameElement is NULL and because of that it is not able to get 'srcdoc' using getAttribute.



              Below can be the possible reason why it is Null.




              If the window isn't embedded into another document, or if the document
              into which it's embedded has a different origin (such as having been
              located from a different domain), this is null.




              So you can try to check for the above mentioned criteria and I suggest you to create a script segment and try to check whether window.frameElement is Null or not. If it is not null than try use GetAttribute before assign its value to IFrame src.



              Another thing you need to notice that srcdoc attribute is not supported in MS Edge. So MS Edge will not have any effect of that attribute.



              References:



              (1) Window.frameElement



              (2) <'iframe'>: The Inline Frame element






              share|improve this answer

























                0












                0








                0







                Looks like window.frameElement is NULL and because of that it is not able to get 'srcdoc' using getAttribute.



                Below can be the possible reason why it is Null.




                If the window isn't embedded into another document, or if the document
                into which it's embedded has a different origin (such as having been
                located from a different domain), this is null.




                So you can try to check for the above mentioned criteria and I suggest you to create a script segment and try to check whether window.frameElement is Null or not. If it is not null than try use GetAttribute before assign its value to IFrame src.



                Another thing you need to notice that srcdoc attribute is not supported in MS Edge. So MS Edge will not have any effect of that attribute.



                References:



                (1) Window.frameElement



                (2) <'iframe'>: The Inline Frame element






                share|improve this answer













                Looks like window.frameElement is NULL and because of that it is not able to get 'srcdoc' using getAttribute.



                Below can be the possible reason why it is Null.




                If the window isn't embedded into another document, or if the document
                into which it's embedded has a different origin (such as having been
                located from a different domain), this is null.




                So you can try to check for the above mentioned criteria and I suggest you to create a script segment and try to check whether window.frameElement is Null or not. If it is not null than try use GetAttribute before assign its value to IFrame src.



                Another thing you need to notice that srcdoc attribute is not supported in MS Edge. So MS Edge will not have any effect of that attribute.



                References:



                (1) Window.frameElement



                (2) <'iframe'>: The Inline Frame element







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 26 at 5:22









                Deepak-MSFTDeepak-MSFT

                1,7811 gold badge1 silver badge7 bronze badges




                1,7811 gold badge1 silver badge7 bronze badges


















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345838%2fiframe-not-working-in-edge-but-works-in-internet-explorer-11%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현