"Syntaxe erreur" avec l'utilisation de CDATA...toXMLString

14 views
Skip to first unread message

GAUTHIER Pascal

unread,
Apr 7, 2013, 9:24:17 AM4/7/13
to greasemon...@googlegroups.com
Bonjour,

Jusqu'à la version 16.0 de Firefox, mon script Greasmonkey fonctionnait très bien. Depuis le code ci-dessous génère une erreur de syntaxe au niveau du CDATA :

    objStyles = document.createElement('style');
    with(objStyles) {
        type      = 'text/css';
        innerHTML = <><![CDATA[
            BODY {
                background-color: #223354;
            }   
        ]]></>.toXMLString();   

Je ne sais pas pourquoi ce bout de code de fonctionne plus.

Merci de votre aide.

Anthony Lieuallen

unread,
Apr 7, 2013, 10:54:11 AM4/7/13
to greasemon...@googlegroups.com
Firefox no longer supports E4X.  So you can no longer embed XML directly in javascript.

https://developer.mozilla.org/en-US/docs/E4X




--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to greasemonkey-us...@googlegroups.com.
To post to this group, send email to greasemon...@googlegroups.com.
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

GAUTHIER Pascal

unread,
Apr 10, 2013, 2:08:32 PM4/10/13
to greasemon...@googlegroups.com
Thank for your answer. I try un other truc. :-)


Le dimanche 7 avril 2013 16:54:11 UTC+2, Anthony Lieuallen a écrit :
Firefox no longer supports E4X.  So you can no longer embed XML directly in javascript.

https://developer.mozilla.org/en-US/docs/E4X
On Sun, Apr 7, 2013 at 9:24 AM, GAUTHIER Pascal <pgadech...@gmail.com> wrote:
Bonjour,

Jusqu'à la version 16.0 de Firefox, mon script Greasmonkey fonctionnait très bien. Depuis le code ci-dessous génère une erreur de syntaxe au niveau du CDATA :

    objStyles = document.createElement('style');
    with(objStyles) {
        type      = 'text/css';
        innerHTML = <><![CDATA[
            BODY {
                background-color: #223354;
            }   
        ]]></>.toXMLString();   

Je ne sais pas pourquoi ce bout de code de fonctionne plus.

Merci de votre aide.


--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to greasemonkey-users+unsub...@googlegroups.com.

Zulkarnain K.

unread,
Apr 10, 2013, 4:57:55 PM4/10/13
to Greasemonkey Users
Have a look at the wiki
http://wiki.greasespot.net/Multi_Line_Strings

On Thu, Apr 11, 2013 at 1:08 AM, GAUTHIER Pascal
>>> email to greasemonkey-us...@googlegroups.com.
>>> To post to this group, send email to greasemon...@googlegroups.com.
>>>
>>> Visit this group at
>>> http://groups.google.com/group/greasemonkey-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to greasemonkey-us...@googlegroups.com.
> To post to this group, send email to greasemon...@googlegroups.com.
> Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Zulkarnain K.
https://mozillians.org/u/zoolcar9
https://profiles.google.com/zoolcar9
Reply all
Reply to author
Forward
0 new messages